Skip to content

API_1_UPDATE_APP

pvicente edited this page Nov 7, 2013 · 14 revisions

API ▸ Update Application

###PUT /1/google/:appid

Update application parameters

###Resource URL https://katooserver.herokuapp.com/1/google/:appid

Parameters  
appid required String: Application ID
token optional String: OAUTH2 token to login with Google XMPP service
refreshtoken optional String: OAUTH2 refresh token to generate new tokens
resource optional String: xmpp resource of app
pushtoken optional String: Push Notification Token. Client identifier to be used with the APNS to send notifications. Empty String if client doesn't have enabled push notifications
badgenumber optional Integer: Badge number of app
pushsound optional String: Push Notification Sound. Sound name (including extension) configured by the user for notifications
favoritesound optional String: Push Notification Favorite Sound. Sound name (including extension) configured to favorite user notifications
lang optional String: User language for custom push notification

** String values can be cleared with " " blank space.

State Machine

|appid|Status Connected|Actions| |:-------------|:--|:--|:--|:--|:--| | Found | T | OK Response | | Found | F | 404 Not Found | | Not found | - | 404 Not Found |

###OK Response JSON

{
 "success": True, 
 "reason": "ok",
 "background_time": 180,
 "resource_prefix": "katooserver",
 "gtalk_priority": 24,
 "ads_gift": False
}

###success True or False

###reason ok when success == True or string message when success == False

###background_time Client app background time in seconds

###resource_prefix XMPP resource prefix sent to server for each XMPP connection. (Useful to detect katoo resources in XMPP)

###gtalk_priority Priority of Gtalk protocol to configure client priority states

###ads_gift True or False if we are giving ads for free

Clone this wiki locally