I want to sync my local db with the server. Let's see I have deleted an item from the web and I comes to my mobile app the email should be deleted from mobile also. How I comes to know which emails are deleted.
Base Url:- https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages/delta.
I am trying #odata.nextLink till #odata.deltaLink comes in response, but in response, I am getting only the emails is there, not getting any tag for delete items.
Have referred this:
https://learn.microsoft.com/en-us/graph/api/message-delta?view=graph-rest-1.0&tabs=http
Can anyone help me with this?
Thanks in advance.
Url:- https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages/delta
Your Response will be
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(message)",
"#odata.nextLink": "https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages/delta?$skiptoken=yourToken",
"value": [
...
]
}
Then try calling nextLink till deltaLink comes in response.
Once the deltaLink came, save the link and change something in your inbox message like delete one message. After deleting the message call saved deltaLink.
You will get your latest changes in response with new deltaLink. For getting further changes you need to call latest deltaLink. In my, case I have stored the deltaLink in shared preference.
Note:- Be sure that you are calling only the latest deltaLink for latest changes.
Shakti S.P. Swain is right. You get only changes when you use the deltalink. In case of the deleted message, you get #removed parameter in it.
Related
I am using the URL
http://itunes.apple.com/lookup?bundleId=com.myCompany.myApp
to get a JSON file with the information about my app. This works if the app is already published on the App Store but I am still developing it and the result coming from that URL contains just this:
{
"resultCount":0,
"results": []
}
I have tried to use
http://sandbox.itunes.apple.com/lookup?bundleId=com.myCompany.myApp
and
https://sandbox.itunes.apple.com/lookup?bundleId=com.myCompany.myApp
and I receive
Http/1.1 Service Unavailable
Any ideas?
It's not possible to do that. I'd suggest using another way to get the data you need or mocking the response you expect while the app isn't available and forward the request to Apple as soon as data is available.
Status Update Notifications, statusUpdateNotification
I set Subscription Status URL in my APP in iTunes account like https://www.xxxxxx.xx/iospushnotification.php
I also successfully tested nscurl --ats-diagnostics https://www.xxxxxx.xx/iospushnotification.php
I also implemented php code in iospushnotification.php file to get JSON response
I purchased successfully Auto renewal Subscriptions Sandbox but I did not get any Status Update Notifications I get blank [] JSON response from apple server to my server.
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW6
if anyone still cares 2 years later, I found a solution, assuming you're using PHP.
from the stackoverflow post Receive JSON POST with PHP we need to do something like this:
$appleData = file_get_contents('php://input');
then try to json_decode($appleData) from there.
(I've never had to do something so weird to get POST data before, but I've mostly used frameworks before; unfortunately, I do not currently have that luxury...)
I am supposed to create a simple chat app using httppost and get in order to send message and to get message.
This is what I am supposed to get after sending the request to the API:
{"conversation":
{"id":35,"created_at":"2014-11-16T19:21:11.000+01:00",
"updated_at":"2014-11-16T19:21:11.000+01:00",
"conversation_type":null,"option_id":null,
"messages":[
{"body":"lol","created_at":"2014-11-16T19:21:13.000+01:00","user_id":34},
{"body":"payday","created_at":"2014-11-16T19:25:57.000+01:00","user_id":34},
{"body":"lol","created_at":"2014-11-16T20:19:26.000+01:00","user_id":34},
{"body":"izi","created_at":"2014-11-17T01:09:36.000+01:00","user_id":34},
{"body":"LOWL","created_at":"2014-11-17T01:11:34.000+01:00","user_id":34}
],
"users":[
{"id":34,"email":"zegfault42#gmail.com","first_name":"Hugo","name":"Barbier"},
{"id":36,"email":"ismael.bourg#gmail.com","first_name":"Ismael","name":"Bourg"}
]
}
}
And I am supposed to make a post request in order to reply message. I just want to know what I can do and how I can design it.
Please read more about HTTP Post & Get methods, REST services.
It is very simple. You can find it on the internet.
Also, I had similar questions when I started developing.
Check the answer to my question here-
Request & Response Windows Phone
Hope this helps
I've copied the code from the Simple track playback project, when I first open the app I open the Spotify login page in Safari and get the callback correctly with a session. When I check the property isValid its YES but the expirationDate is same as current time.
When I then request playlistsForUserInSession the first time it's fine, but if I try to fetch it again I get the following message:
Error Domain=com.spotify.ios-sdk Code=500 "internal server error"
UserInfo=0x16eb00c0 {NSLocalizedDescription=internal server error}
What seems to be the error?
I can also add that when I have fetched the playlist (first time) I can easily request to play music, fetch nextPage in the playlist and so, it there something wrong with playlistsForUserInSession in particular?
I've found the issue.
I missed to send the read playlist flag in scopes when I requested the token, and therefore couldn't fetch the playlist.
Really would have hoped that Spotify send something different from "500 Internal server error" so I wouldnt spend hours to find this bug :)
So for all of you others, check so your scopes are correct!
Hi i am using sync api to sync my app data to DropBox. Now i want to list and download(import) images from DBX(i can't use core api because i already used sync api). DBFileSystem only works after first sync complete so i added observer to DBFileSystem its called with completedFirstSync value false. This error also coming
"[ERROR] ERR: DROPBOX_ERROR_NETWORK: cfhttpbinding.c:363: CFHTTP Read Error: (kCFErrorDomainCFNetwork, 2) and completedFirstSync remains false"
In my case user link with DBX then list the images from DBX then download which one they want.
How can i acheive this using sync api?.