GithubHelp home page GithubHelp logo

Comments (4)

klacointe avatar klacointe commented on July 26, 2024

This property is missing from mapping: https://github.com/klacointe/wikidata-client/blob/master/config/mapping.yml but you can request it using the wikidata property code P154:

% bundle console
Resolving dependencies...
irb(main):001:0> require 'wikidata'                                                                                                                            
=> true
irb(main):002:0> apple = Wikidata::Item.find_by_title 'Apple Inc.'                                                                                             
=> <Wikidata::Item id: Q312, title: "Apple Inc.">
irb(main):003:0> apple.property('P154')
=> #<Wikidata::Property::CommonsMedia:0x0055a24fd7bb70 @property=#<Hashie::Mash id="q312$5B574C40-5C57-4246-A143-F8D32584CE81" mainsnak=#<Hashie::Mash datatype="commonsMedia" datavalue=#<Hashie::Mash type="string" value="Apple logo black.svg"> property="P154" snaktype="value"> rank="normal" type="statement">>
irb(main):004:0> apple.property('P154').url
=> "https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg"

from wikidata-client.

bricemaurin avatar bricemaurin commented on July 26, 2024

the "logo_image" is in the mapping: https://github.com/klacointe/wikidata-client/blob/master/config/mapping.yml , that's weird

but I'll use the property instead, that's perfect

Thanks !

from wikidata-client.

klacointe avatar klacointe commented on July 26, 2024

Ok I understand, I forgot to push a new version on rubygems with last mapping updates.

You can use https://rubygems.org/gems/wikidata-client/versions/0.0.9

from wikidata-client.

bricemaurin avatar bricemaurin commented on July 26, 2024

Perfect ! It's working fine now.

Thanks Kevin ;)

from wikidata-client.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.