Page 1 of 5

getchannels

Posted: Fri Feb 01, 2013 5:43 pm
by Jon Crump

Following your tutorial (http://docs.tiggzi.com/tutorials/send...)

Where does the getchannels service come from? Is it automatically created, I don't see it?


getchannels

Posted: Fri Feb 01, 2013 6:00 pm
by Kateryna Grynko

Hello,
You can create getchannels service yourself.


getchannels

Posted: Fri Feb 01, 2013 6:51 pm
by Jon Crump

In the screen shot I see there are 3 other services, SubscribeChannel, UnsubscribeChannel and Register Device, but I don't see any information on how to create these 3 services. How can we know from the service urls are for the above 3 services?


getchannels

Posted: Fri Feb 01, 2013 7:17 pm
by Kateryna Grynko

"GetChannels"
URL: https://api.tiggzi.com/rest/push/reg/...
Request parameters:

  • guid: project GUID looks like "1be1131b-5b02-4244-ac30-74868af5db5d"

  • appType: "A" for Android, "I" for iOS

  • deviceId:

    Response:
    JSON data
    [
    {
    "id":173,
    "name":"channel2",
    "subscribed":true
    },
    {
    "id":172,
    "name":"channel1",
    "subscribed":true
    },
    {
    "id":181,
    "name":"channel4",
    "subscribed":true
    }
    ]

    "SubscribeChannel"
    URL: https://api.tiggzi.com/rest/push/reg/...
    Request parameters:

  • guid: project GUID looks like "1be1131b-5b02-4244-ac30-74868af5db5d"

  • appType: "A" for Android, "I" for iOS

  • deviceId:

  • channels: array [31, 41, 59, 26], channel numbers from previous Rest Service are listed here

    Response: is absent

    "UnsubscribeChannel"
    URL: https://api.tiggzi.com/rest/push/reg/...
    Request parameters:

  • guid: project GUID looks like "1be1131b-5b02-4244-ac30-74868af5db5d"

  • appType: "A" for Android, "I" for iOS

  • deviceId:

  • channels: array [31, 41, 59, 26], channelsnumbers are listed here

    Response: is absent


getchannels

Posted: Fri Feb 01, 2013 7:28 pm
by Jon Crump

and the deviceId is always blank?


getchannels

Posted: Fri Feb 01, 2013 7:39 pm
by Kateryna Grynko

Yes, there should be DeviceID....


getchannels

Posted: Fri Feb 01, 2013 8:01 pm
by Jon Crump

So where does the deviceid come from?
Device1 doesn't work as in your tutorial.
The RegisterDevice service has no information in the tutorial?
Is that what creates the deviceId?


getchannels

Posted: Fri Feb 01, 2013 8:25 pm
by Kateryna Grynko

We have "RegisterDevice" service for deviceId registration. You can use deviceId in following services: GetChannes, SubscribeChannel, UnsubscribeChannel.

"RegisterDevice" parameters:
URL: https://api.tiggzi.com/rest/push/reg/...
Method: "put"
Content Type: "json"

Request parameters:

  • guid: project GUID looks like "1be1131b-5b02-4244-ac30-74868af5db5d"

  • appType: "A" for Android, "I" for iOS

  • deviceId: ID of device

  • token: can't be empty, any symbols are allowed

    Response: is absent


getchannels

Posted: Tue Feb 05, 2013 7:55 pm
by Jon Crump

So RegisterDevice uses a different url to the other services?
https://api.tiggzi.com/rest/push/reg/...

I'm still confused where the deviceId comes from?
It seems like there is a lot of information missing from the tutorial, is there other information documented else where?


getchannels

Posted: Wed Feb 06, 2013 8:43 am
by Maryna Brodina

Hello! deviceId it's a device sereal number. You can get it calling JS function:

PushNotification.getDeviceUniqueIdentifier()

We'll update tutorial.