Benestar / wikibase.net

Api client for the MediaWiki extension Wikibase
http://wikiba.se/
GNU General Public License v2.0
8 stars 6 forks source link

getEntityFromSitelink - Unsupported type quantity #3

Open pastorius187 opened 10 years ago

pastorius187 commented 10 years ago

t doesnt work. getEntityFromSitelink throws an exception

Dim api As WikibaseApi = New WikibaseApi("https://www.wikidata.org", "Wikibase.NET Example/0.1")
api.login("XXX", "YYYYY")
Dim entityProvider As New EntityProvider(api)
Dim languages = { "en", "cs"}
Dim entityBySitelink As Entity = entityProvider.getEntityFromSitelink("enwiki", "Prague", languages)
 ...

A first chance exception of type 'System.NotSupportedException' occurred in Wikibase.NET.dll System.NotSupportedException: Unsupported type quantity v Wikibase.DataValues.DataValueFactory.newDataValue(String type, JsonValue value) v Wikibase.DataValues.DataValueFactory.newFromArray(JsonObject data) v Wikibase.Snak.newFromArray(JsonObject data) v Wikibase.Claim.fillData(JsonObject data) v Wikibase.Statement.fillData(JsonObject data) v Wikibase.Claim..ctor(Entity entity, JsonObject data) v Wikibase.Statement..ctor(Entity entity, JsonObject data) v Wikibase.Claim.newFromArray(Entity entity, JsonObject data) v Wikibase.Entity.fillData(JsonObject data) v Wikibase.Item.fillData(JsonObject data) v Wikibase.Entity..ctor(WikibaseApi api, JsonObject data) v Wikibase.Item..ctor(WikibaseApi api, JsonObject data)

Ahoerstemeier commented 10 years ago

The quantity datatype is not supported, the newly introduced monolingual text neither. My rework branch has the quantity already, and will have the monolingual text soon - see https://github.com/Ahoerstemeier/wikibase.net/tree/rework