Addshore

It's a blog

Tag: API

The break in Wikidata edits on 28 Jan 2016

On the 28th of January 2016 all Wikimedia MediaWiki APIs had 2 short outages. The outage is documented on Wikitech here.

The outage didn’t have much of an impact on most projects hosted by Wikimedia. However due to most Wikidata editing happening through the API, even when using the UI, the project basically stopped for roughly 30 minutes.

Interestingly there is an unusual increase in the edit rate 30 minutes after recovery.

I wonder if this is everything that would have happened in the gap?

Github release download count – Chrome Extension

The Github IconGitHub tracks the number of downloads for all assets (files) that are attached to a release, but GitHub currently makes it very hard for users to get at this information. The number of downloads is currently only accessible through the API.

I noticed this many months ago when wondering how many people were downloading the new C++ version of Huggle. At the time I started coming up with some odd little script that I could set running somewhere checking the download counts and updating a static list, I even thought about just uploading the build files to some other site that tracked this information.

A few days ago I took my first look at developing chrome extensions for a referencing tool for Wikidata, and thus today I thought, why not just make an extension for chrome that adds the download counts to the GitHub releases page!

Continue reading

Media Hack Day 2014

the Media Hack Day logoThe Media Hack Day is an annual event held at Axel Springer | Plug & Play Accelerator in Berlin. The event for March 2014 can be found on hackerleague.org.

I attended representing the Wikidata API. Also in attendance were Axel Springer, storyful, Der Spiegel, sanoma, watchmi, Getty Images and embed.ly. It was in a great location, the food and rinks were great and it was generally well planned by the organizes and a pretty competitive crowd turned up.

At noon on the following day all hacks were presented to the API partners and all other attendees. The ‘News sightseeing’ hack was awarded a swag pack from Wikidata for making the best use of the API. They were also awarded the Axel Springer iPool and Getty Images prizes.

Details of the project can be found on hackerleague and the code can be found on GitHub and the teams blog post summary can be found on their own blog.

How ‘News sightseeing’ used the Wikidata API

Firstly it is important to say that at the time of the hackathon Wikidata didn’t really provide any good way to query the data it help, simply retrieve it, but luckily there was a query tool available that is currently located at https://wdq.wmflabs.org.

The code that interacts with the Wikidata API can be found in Aggregator/wikidata.rb.

Initially the code uses the 3rd party query tool to find a list of items matching the criteria in the query, the current query in an editor can be seen here(Service now offline, text link included below) or in the image below. The criteria basically look for items in Munich that are NOT roads but do have images and coordinate locations.

a Screenshot of query used at Media Hack Day 2014

The data for each item is then retrieved from the Wikidata API using the wbegtentities module.

Various parts are then stripped from the whole entity for use within the application:

  • The German label is used as a title
  • The German Wikipedia sitelink is used as a URL
  • The German description is used for content body
  • A statement with property P18 is used as an image
  • A statement with property P571 is used as the initial date
  • A statement with property P625 is used for the precise location

As a result the app has access to information (including images) of possible locations to go sightseeing around the user.

Read more about News Sightseeing

Or watch their demo video

© 2017 Addshore

Theme by Anders NorenUp ↑