Giter VIP home page Giter VIP logo

ti.appwrite's Introduction

Titanium module for Appwrite

screenshot

Titanium Android module using Appwrite's Android SDK

What is Appwrite:

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Android SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to https://appwrite.io/docs

Installation

  • create and run an Appwrite docker machine: https://appwrite.io/docs/installation
  • download ti.appwrite module
  • add <module>ti.appwrite</module> to your tiapp.xml
  • add the following section to your <application> section:
<application>
	<activity android:name="io.appwrite.views.CallbackActivity" android:exported="true">
		<intent-filter android:label="android_web_auth">
			<action android:name="android.intent.action.VIEW"/>
			<category android:name="android.intent.category.DEFAULT"/>
			<category android:name="android.intent.category.BROWSABLE"/>
			<data android:scheme="appwrite-callback-[PROJECT_ID]"/>
		</intent-filter>
	</activity>
</application>

Appwrite setup

Start the docker machine and create a new project. Make sure to add an Android platform with your package name. Under Settings you will find the Project ID.

Titanium setup

var appwrite = require("ti.appwrite");
appwrite.create({
	endpoint: SERVER_URL,
	project: PROJECT_ID,
	selfSigned: true,
	channels: ["files", "account"]
});

Full example: app.js
Full tutorial at: from zero to app: Appwrite + Titanium: A step by step guide

Methods

  • create()

  • checkConnection()

  • createAccount()

  • deleteAccount()

  • createSession()

  • getAccount()

  • getDocuments()

  • getDocument()

  • deleteDocument()

  • createDocument({})

  • subscribe([])

  • unsubscribe([])

  • createFile({file, read[], write[]})

  • listFiles();

  • getFile(id)

  • getPreview({id:string, width?:int, height?:int, quality?:int})

  • downloadFile(id)

  • deleteFile(id);

Events

  • account
  • error: action, message, code, response
  • realtimeEvent
  • database: e.documents for list
  • storage: e.blob for file download, e.files for file list
  • connection: status (true/false)

Author

Buy Me A Coke donate button

ti.appwrite's People

Contributors

m1ga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.