I have been attempting to get the twitter trends but I am unsure of how to do this with json. I also have not found any good tutorials that I am able to follow to accomplish this successfully. As of now, I have been using Hammock to get my statuses, mentions, etc. Are there any tutorials that completely describe how to do this?
The best way is using the Twitter Official API (JSON). You can see the example.
Anyway, I found a link that may help you: Windows Phone 7 – Asynchronous Programming.
All you have to do is use this API method, with an unauthenticated HTTP request.
Given that you are a beginner, here are some starting tips:
How to perform a HTTP request
Parsing JSON with JSON.NET
Related
For a given Google API, is there any way to dynamically check usage against any of the current limits for that API?
For example, this page https://developers.google.com/classroom/limits?hl=en shows that I can query the Classrooms API 4,000,000 times per client per day. At midday, without going to the API Console, how could I know that I've already hit 3 million queries?
I'm hoping that there's a billing or usage API that covers this, but can't see it.
Note: I'm not having any issue right now with a specific call, just anticipating that my usage will scale up significantly in the next few months, so am looking for a solution for monitoring rather than advice on not hitting the limits at all. My specific use-case is for Google Classrooms, but reading wider around this I can't see a general solution either.
Answer:
No, dynamically you can't retrieve this information.
Feature Request:
You can however let Google know that this is a feature that is important for the Google Workspace APIs to have, and that you would like to request they implement it.
The page to file a Feature Request for the Google Classroom API is here, as there is no specific component for Google Workspace APIs in general I would suggest filing it here instead.
You can use Google's Cloud Monitoring API to achieve this. This is the documentation page for APIs-
https://cloud.google.com/monitoring/api/v3
This is the documentation page for concerned metrics-
https://cloud.google.com/monitoring/api/metrics_gcp#serviceruntime/quota/allocation/usage
https://cloud.google.com/monitoring/api/metrics_gcp#serviceruntime/quota/exceeded
https://cloud.google.com/monitoring/api/metrics_gcp#serviceruntime/quota/limit
in my Laravel 5.7/mysql app I need to make external api to read some data from external
app with get request and to write some data to my db with post request.
Which tools/scripts are there for this and how to make these requests safe?
MODIFIED :
Thanks for feedbacks, but looks like I badly put my question
The external app(I do not know what is it written with) need to read data from my app
and write data to my Laravel 5 app.
And how have I to test these requests while on development locally ?
Looks like I have to use Guzzle as in provided link?
Which steps have I to take for safety on my side?
Thanks!
These three libraries are popular for your use-case:
Guzzle
Curl
zttp
If the database is local you can use Eloquent, If not, remote connection to that database may help. otherwise, if you only have API access you should consume eighter of above libraries or any alternative options to make an HTTP request your application might require.
Security-wise, as long as you are only making a request to a remote server, the Suggested way is to store any key or secret string related to authorizing your request (if applicable) in your .env to prevent it from committed to your version control systems. Needless to say to always handle any possible HTTP error your remote API might throw in order to prevent any unwanted error on your application side.
And as Abir Adak mentioned in the comment check this thread for further details.
Updated Answer: On the case of MODIFIED part, generally you have 3 popular options,
REST API
This blog post is a detailed walkthrough written for Laravel
This one from Stack Overflow can help you with designing you API
This last one can help you to develop a widely accepted API response and endpoints by following its specifications.
GraphQL
Can save some time for developing your API, but I suggest to make sure that the consumers of your API are happy to use this option.
GraphQ
Laravel Package for GraphQL
If using Laravel isn't a must, and you are using PostgreSQL, you might want to look at Hasura as well.
SOAP
Have little knowledge on this option for Laravel, just know folks coding using C# and .net are happier to expose their API with this protocol. read more about it on WikiPedia
Postman is a great tool for testing your API or any other API.
When searching in Yammer it uses an /api/v2/search endpoint like this:
https://www.yammer.com/api/v2/search/models?search=test&start=0&size=20&model_types=threads&_network=xxxxxxx&relevance=DEFAULT
Compared to the v1 search endpoint this returns more data. We need this data. And we successfully tested using this v2 endpoint.
Now the question: Is this v2 search endpoint safe to use? Is it "official"? Maybe somebody from Yammer reads along - on their Help page it says:
We encourage you to post all programming questions to StackOverflow
with a #yammer hashtag
So here we are. Any help is appreciated.
The Yammer v2 search API endpoint is not yet officially supported for third-party use. This is because we anticipate the need to make changes to it as we build it out. There are no plans to lock developers out of experimenting with the v2 search API. However, when developing any important functionality against this API, automated testing should be used to detect any unannounced breaking changes that we make while we continue to build it out.
I am using https://github.com/artdarek/oauth-4-laravel#basic-usage library for Laravel 4
The example they provide is how to login with Twitter. I DO NOT NEED THAT.
All I am trying to do is send a GET request to https://api.twitter.com/1.1/search/tweets.json with my query. THAT IS ALL!!
However, it keeps complaining that I need to Authenticate my application. No Internet forum has been left unturned searching for a tutorial. NOTHING. Virtually every post is how to login with twitter.
I have read this: https://dev.twitter.com/oauth/application-only but failing to understand how to get Bearer Token via Oauth-4-Laravel library. Anyone has experience with this specific library to point me in the right direction?
Thanks!
I realise that my answer isn't referring to the library you're using, but I can't comment on things yet.
You can use Guzzle to do this with Guzzle's OauthPlugin. It should be fairly easy.
Laracasts did an example connection to Twitter. I believe that uses Guzzle 3 or 4.
The most recent Guzzle is Guzzle 6. I had a bit of trouble integrating that with Laravel 5. But have a look at how I did it, it may be of help to you. https://github.com/votemike/shorttwittername/tree/master/app/Twitter
Im trying to figure out whether it's possible to show the posts of my google+ community on a website.
I read the Google+ Web API and HTTP API, but nothing seems to satisfy my request.
I know this is an absolute newbie question. But I appreciate any hint:
is it in general possible?
which API I have to use?
Thanks a lot!
The APIs do not provide support for getting any type of Google+ Community post even if they are public. In the past this worked, but it was never supported and has since stopped working.