Getting stock graphs from yahoo finance - yahoo

I am using yahoo finance to get stock quotes. Now i want to get the graph of a particular company. Is it possible to do this using yahoo. If not could someone please provide some other api through which one could achieve this. ( the 20 minute delay is not an issue at all). I am looking for stocks listed in bse and nse.

Yahoo Finance API lets you retrieve graphs of stocks.
The main url is https://chart.finance.yahoo.com/z?s=AAPL&t=6m&q=l&l=on&z=s&p=m50,m200
For options to use, please refer to this page.
The result is a picture, so you just have to write (for eg in HTML):
<img src="https://chart.finance.yahoo.com/z?s=AAPL&t=6m&q=l&l=on&z=s&p=m50,m200"/>
to display:
Please note that I'm not sure if Yahoo Finance supports stocks for India, http://in.finance.yahoo.com/q?s=%5EBSESN and http://in.finance.yahoo.com/q/cp?s=%5ENSEI don't seem to display list of components...

Related

Using google maps api, how to find all ZIP codes within a radius?

I need to find all zipcodes within a given radius. I've googled a page that does exactly that: https://www.freemaptools.com/find-zip-codes-inside-radius.htm but its author doesnt respond. Any ideas how he did that?
Here's a product ZipCodeAPI that does that.
Use this API to find all US zip codes within a given radius of a zip code. Send a GET request to https://www.zipcodeapi.com/rest/<api_key>/radius./<zip_code>//.
There is a free subscription and a paid subscription available.

Google Classroom: Find userId from the google doc

How can I find the userId of the student to which a CourseWorkSubmission has been submitted?
Steps:
Student is assigned coursework using Google Classrooms.
Teacher views coursework (docs.google.com URL).
I click Add On, to try and pull out student info, but can't find the context for the student (e.g. userId, actorId) or even the submissionId in order to make a call to the API to get the information.
Any help or pointers gratefully received :)
References:
Have checked out the Google Classroom API:
https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/get
And the Google Drive API:
https://developers.google.com/drive/v3/web/about-sdk
When you do your get of the studentSubmission here https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/get the response will contain a userId. That userID is the Students google ID you're looking for.
Go ahead and run the Try this API functionality on the https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/get page and you should see what I"m talking about.
The full response information is listed here https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions
If you're having a problem finding the relevant courseWork ID, then use the list capability here https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/list (Put a - in for the courseWorkId)

How to get yammer Likes count from embed

The documentation doesn't show how its possible to get the number of likes Yammer embed like you get with Facebook.
Is this possible in #yammer?
I'm using this embed script: https://developer.yammer.com/connect/#action-buttons
It's been a couple months so it could have changed, but the likes for the OG objects are not contained within the object but rather in the user's profile. So you can't see the number of likes on an OG object.
To get this functionality, I ended up using the like/unlike API and on success, I update a database with the like count for the specific OG object. Then on page load, I query the DB and get the like count.

Google Places API Reviews, changing the sorting order?

Well according to the docs https://developers.google.com/places/documentation/#PlaceDetails the Google Places API is now able to display 5 reviews from a specific location which is pretty awesome!
But these reviews are rolled out by "Most Helpful" which is the default order on a Google + Local page.
I think it would be a bit more helpful if these review where rolled out by latest so you can indicate when a review was last posted.
Is there any consideration in changing the reviews sorting order?
Or is there some way I can figure out when a new review gets posted via the API?
There is currently no way to figure out if a new review gets posted via the Places API. If you believe this or sorting of reviews would be useful feature you can submit a 'Places API - Feature Request' here.
The sorting method to use when returning reviews. Can be set to most_relevant (default) or newest.
For most_relevant (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.
For newest, reviews are sorted in chronological order; the preferred language does not affect the sort order.
Google recommends that you display how the reviews are being sorted to the end user.

Designing a homework assignment for AJAX

I'm responsible for designing a homework assignment to teach a class of ~100 students about AJAX. They have a solid knowledge of CSS/xHTML, but most are new to Javascript. I don't want the assignment to require use of JQuery or any other framework.
I want them to build something with AJAX. The server side will be handled either by the course staff, or by using some external service. (Like Twitter, Google, or Facebook... what else?)
One idea I had was to ask students for an app with the following functionality:
list tweets by username, including date and "in reply to" info
find profile image by user
ability to click on "in reply to" info to see info by that user
list followers and friends by username
The point of this assignment isn't necessarily to build something new or useful, but to equip students with a solid understanding of AJAX so they can build their own apps in the future.
if you dont use a framework, you'll have to talk about going into half a dozen try catches to create the actual object in multiple browsers (or is that not a concern?). If not, I would go with the w3schools one.
I'd suggest a public API like the bing search API since it returns results in XML format.
For example, http://api.search.live.net/xml.aspx?Appid=...&query=chocolates&sources=web
to see an XML document for the query term "chocolates." You'll need to register at http://www.bing.com/developer to get an APPID but you can share it with your students.
Another possible web service is GeoNames: Geonames

Resources