How to use Telegram API in Windows Phone 8? - windows-phone-8

I would like to use Telegram API for Windows Phone 8. Though unlike other platforms, Telegram doesn't provide source code for Windows Phone. This is unfortunate because it creates a lot of problems for those who want to use it. From my research people mention using REST Service to accomplish that. Though no one showed any exact solution for how to accomplish it. I also read about using RPC calls to accomplish it. I don't know how to do that and I would greatly appreciate someone who could explain step by step to how to implement Telegram in ones app. Big Thanks!

If you need to see source code of an app using the Telegram API you should take a look at github.
There are a lot of apps there using this API:
API, Protocol documentation
Documentation for Telegram API is available here: http://core.telegram.org/api
Documentation for MTproto protocol is available here: http://core.telegram.org/mtproto
Take a look at this one https://telegram.org/apps#telegram-for-wp
You can browser their source code there downloading the zip. Unfortunatelly Stackoverflow does not permit we post a step by step walkthrough of using an API.

Related

Program/tool for reading/logging http requests and responses?

I'm trying to log autocomplete responses from a gmail "people" server, and I'm trying to find a program or tool to do this, like the network section in chrome dev tools. I tried using a web crawler script, but authentication would be a mess. I also tried Wireshark, but it was all garble to me and probably the wrong way to go. Is this even possible? Can somebody help me, I'm totally out of my comfort zone here. please see attached image
It would be best to find an API that google makes public for the data that you need and use that to query the data. For people, google does have an API. Have a look here: https://developers.google.com/people
Tools commonly used to make HTTP queries are https://www.postman.com/ and https://curl.haxx.se/

Google Drive Android SDK: where to start from?

I have been looking all day at the Google Drive SDK for Android,
but I am a bit confused.
I need to make the list of folders and files in the user Google Drive account.
I thought that was a simple, basic standard feature, but maybe not...
Please can you help me?
You have two possible ways to go:
use RESTful API, or
use Google Drive Android Api (GDAA)
I would say the former would be easier to start with.
If you decide to go with the REST, you may use the GitHub demo here, that has both the REST and the GDAA 'CRUD' implementations (you just comment out the one you don't need). It also has some code to deal with the authentication / authorization which you need to do anything on Google Drive. See SO 28439129.
In case you decide to use GDAA, (you still have to get the authorization done), the 'official' to get you started demos are here and here.
You will definitely run into a lot of roadblocks and the solutions are mostly found here under the tag 'google-drive-android-api'.
Good Luck.

google cloud print post

I'm trying to ultimately silently print using Google Cloud Print from a POST function that is called from code on a website.
I succeeded in testing cloud printing using my account and my printers using a form submit.
(you can see the code that worked for that here: https://stackoverflow.com/questions/23975931/programatically-change-file-name-in-google-chrome-print)
The form submit didn't ask me for any authorization that I could tell. It asked me for xsrf. I stumbled across the answer for this by testing here:
https://www.google.com/cloudprint/simulate.html
So my question is can some amazing person please take pity on me and post the entire code for POST to submit a print job to GCP INCLUDING the format for authorization and where I get that info?
I have read the manuals for cloud printing and the info on how to get an oauth (although I don't understand that part yet)
I am missing something that will be obvious to people who have done this before.
I have tried the php code at github - although I do not usually code in php.
I have programmed a lot of API's and there is something I am just missing here.
Thank you profusely in advance!
i developed this simple library in python. https://github.com/escube/GoogleCloudSpooler
You cna use as you wish.
I developed a server version as well, but the lib used is the one in this project.
Try to use it and tell me if you have problem with that, I'll be pleased to help.
You could try using an alternative service such as PrintNode which has an excellent API and is very simple to use.

Incorporate Google Drive solution in existing Android app project?

I have an existing Android app project which has been already published on the Google Play, and now I would like to incorporate in my app the possibility to use the Google Drive possibilities in order to download *.jpg files directly to the sd card when the app is opened or load for the first time. Like this I liberate the internal memories of the phones where this app is installed (All the images are stored in the resources of the app actually which is >~ 20MB). I have read a lot of forums concerning the Google Drive SDK or API subjects and I can say that I'm a little bit lost on the manner to manage it for my present app. Some ideas or suggestions would be very very very appreciated.
Thank you very much).
Please see this question for the basics on how to integrate your Android app with Google Drive SDK: Access to Google Drive from self implemented Android application
In it, I reference a good Google+ tutorial on how to get started, and it's easy enough to take the concepts and apply them to an existing app. (That's how I did it too.) Before you get started, sign up for the Google APIs (https://code.google.com/apis/console/), get into the API Console, and turn on both the Google Drive API and Drive SDK. This'll make coding go a lot smoother. Let me know if you have any problems.
One addendum for your specific case relating to *.jpg files is you could set a MIME type for fetching strictly the pictures. It'd go something like this:
request = service.files().list(); // .setQ("mimeType=\"text/plain\"");
Unfortunately setQ is commented out because it would fail to return any results when I used it. However, you may have better luck with the image/jpeg MIME type.

google-drive-sdk : call google-drive-sdk

I am new using google scripts and drive-sdk.
I'd like to call the copy functionality of drive-sdk. When I try it, I get a message that says I need authentication.
Where can I find an example of how can I authenticate from a google script to authenticate de drive-sdk?
Thanks in advance.
Biagio
Have a look at the Google's Drive SDK docs regarding authentication.
https://developers.google.com/drive/quickstart-php is a good example in PHP. other languages they have quickstart examples for: Java, Python, .NET, Ruby, Javascript, Go, and Objective-C/iOS
First, view Google's information on authorising with the Drive API.
Then, choose which language you wish to use, I would reccomend JavaScript (or Node.js) if you want to play around or are making a web app.
If you wish, you can view a simplified explanation of the OAuth2.0 flow.
To clarify, the basic steps you can use to get going in JavaScript (as an example) are:
View this official Google getting started page
Set up the Drive API in the Google Developers Console
Copy the code from the getting started page
Ensure you place your ClientID from the Google Developer console into the copied code
Install Python if you haven't already (version 2 or 3)
Start the web server using Python (python -m SimpleHTTPServer 8000 for version 2) and load 'http://localhost:8000/quickstart.html' into your web browser