Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

getchannels

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

getchannels

Hello,
You can create getchannels service yourself.

Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

getchannels

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

getchannels

"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

Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

getchannels

and the deviceId is always blank?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

getchannels

Yes, there should be DeviceID....

Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

getchannels

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

getchannels

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

Jon Crump
Posts: 0
Joined: Tue Dec 11, 2012 8:34 pm

getchannels

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

getchannels

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

PushNotification.getDeviceUniqueIdentifier()

We'll update tutorial.

Return to “Issues”