I have a websites that has a blog section, which pulls the data using the Tumblr API.
My client just updates her Tumblr blog and the website would just access the Tumblr API to populate the blog page on the website. Also, any blog items tagged as news will show up on the home page.
I could be wrong, but I am sure there are limits to the rate of accessing the API, and so I am thinking I should somehow store the data in a database or even json file.
What would be a good way to "cache" the Tumblr API data so that I am not accessing the API everytime somebody views the website?
thank you!
phpTumblr has a caching class (class.read.tublr.cache.php)
Related
I'm using Vuejs frame-work, and I'm looking for a solution that will allow me to pull from a link of shopping sites like Amazon and show me all the product details on Json, like there is on YouTube that when copying a link for example to WhatsApp, then the link loads information about the video.
someone know witch technology is recommended for this?
You could use a web crawler such as dexi.io to extract the html of interest from any web page. Calling dexi can be done programmatically from your code.
My Data Science team is trying to pull Hubspot info into their data visualization platform via Hubspot's API.
They're telling me that they can't find the information fora contact's pageview anywhere. I've searched the documentation for the API, contacted Hubspot Support (who told me they can't help with the API), and spent hours googling but I can't find any information on this.
Does the API simply not provide that information? I know it's collected, because I can see page views in a specific contact's timeline...so why can't I access it via API?
Has anyone overcome this challenge in the past or does anyone have any advice?
I should mention that I'm about 10% literate when it comes to anything code related...so I could just be missing something.
Assuming you are using PHP in your API, then you should be able to find the number of page views here:
$objHubSpot->properties->hs_analytics_num_page_views->value
(where $objHubSpot is the name of the HubSpot object returned through API)
If you want to know the actual URL of the visited pages, then keep in mind that HubSpot only keeps a record of the last few URLs.
In facebook, we can specify a web page url and add comments to it, or fetch comments for it, with the Graph API.
Later we can fetch the comments for the page, using a sample code, and display them on my page, as a widget, using a javascript code.
Similarly, is it possible to setup comments for a web page virtually using google plus, and display them with a code, using the API ? I came across google plus client library for php, but not sure about how to achieve what i wanted, with it.
Currently there is no public write API for Google+ or a way to bi-directionally integrate Google+ comments with an outside web page.
You can incorporate comments from a Google+ post onto your static page. Here are a couple of resources that can illustrate how:
The full documentation for the Google+ read API is at https://developers.google.com/+/api/ and there are libraries for PHP and JavaScript at https://developers.google.com/+/downloads/
http://little418.com/2011/12/google-comments-on-your-static-html-blog.html contains some examples about how to echo comments from a Google+ post.
Has anyone found a way to retrieve the activity feed on Steam for a specific user to post on a website similar to tweets? I'm adding an activity feed to my website, but really the only thing I'm most active in is Steam, so it will get stale pretty quickly without Steam in there. I've looked at the web API, but it doesn't specify if I can grab my full feed and post it or if I can just grab certain stats for specific games or not. I've tried to find an RSS feed for my activity but had no luck so far, that would definitely be the preferable format.
I've just looked at this and you can't grab the web feed directly from the site on RSS or JSON. The Web API is meant for developers of Steam applications so that they can get at the player information. For that, you need an API Key, which is provided by Steam. It is not a casual web interface like you might find on Google.
The nasty solution is to HTML scrape the page. I used Yahoo! Pipes to scrape the page (and automatically update) but ultimately decided that was entirely too dirty as it assumes that the Steam pages won't change.
A bit too late, but I'm also searching for this kind of RSS feed. I think I will end up creating a RSS bot to parse the AJAX response used to fetch the activity feed:
http://steamcommunity.com/id/[your username]/ajaxgetusernews
This URL doesn't work out of the box, I think we have to pass some cookies to get access to this page to make Steam think the bot is logged in as a normal user. It returns the HTML markup used to render the activity feed, and a URL to fetch the next batch of activities.
Be advised that this HTML markup is hard to parse because it is inconsistent.
There is a Worpdress plugin, which makes for a great example, that does exactly what I am asking, called Vikispot. However, I would like to use Google Data API as the source of the data for Videos, Blogs, News, etc... then just like Vikispot, display the data on my website in a sidebar. Vikispot does the job as far as displaying data from other websites that are related to the keywords in a blog on website, in a sidebar. Although I would like the same code that Vikispot is using and implement this into my drupal based website.
I have searched all over the place and cannot find an answer. I hope it isn't right under my nose =]
Google Data API 2.0 supports an Atom-format RSS interface.
Use the RSS variant of Google Data API with any RSS feed reader widget. There are dozens..