Skip to content

Latest commit

 

History

History
68 lines (58 loc) · 3.17 KB

Get Sources.md

File metadata and controls

68 lines (58 loc) · 3.17 KB

Get Sources

All answers on WikiRate are sourced. A source is generally a company report, including CSR Report, Sustainability Report, Annual Report or Integrated Report. It could also be a news article, website, conflict mineral report or modern slavery report and so on. A source can be added to WikiRate as a URL or file upload. Once a source is added it will remain on the platform so researchers can easily access the document.

This example assumes you have configured your Wikirate REST client. Instructions on how to configure a client can be found in examples/Configurations.md

The get_sources method take as an input a Hash where the user can define the parameters of their request. More specifically, we could divide our params in two different types of parameters, the endpoint parameters and the filter parameters. The endpoint parameters help us to iterate through our query's results and the filter parameters allow us to restrict our results based on specific given input.

endpoint params:
  • limit: default value 20, the maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
  • offset: default value 0, the (zero-based) offset of the first item in the collection to return

filter params:

  • wikirate_title: returns sources that contain in their title the given string

  • wikirate_topic: returns sources that fall under the defined wikirate topic. All wikirate topics can be found here.

  • year: returns sources that referred to the defined year.

  • wikirate_link: returns sources with where the source is linked to a url that contains the specified string

  • company_name: returns sources of companies that their name contain the given string.

  • report_type: returns all sources of the given report type. Allowed parameter values:

    • 'Aggregate Data Report'
    • 'Annual Report'
    • 'Business Responsibility Report'
    • 'Code of Conduct'
    • 'Communication on Progress'
    • 'Company Website'
    • 'Conflict Minerals Report'
    • 'Corporate Accountability Index'
    • 'Corporate Social Responsibility Report'
    • 'Data Breach Report'
    • 'Gender Pay Gap Report'
    • 'Human Rights Policy Document'
    • 'Integrated Report'
    • 'Member List'
    • 'Modern Slavery Registry Submission'
    • 'Modern Slavery Statement'
    • 'Privacy Policy Document'
    • 'Research Document'
    • 'Responsible Investment Transparency Report'
    • 'Signatory List'
    • 'Standard'
    • 'Supplier List'
    • 'Supply Chain Policy document'
    • 'Sustainability Report'
    • 'Terms of Service'

In the example below, we are looking for Conflict Minerals Reports of Nike's for 2021 coming from the sec.gov.

sources = client.get_sources({ 'company_name' => 'Nike Inc.',
                               'wikirate_title' => 'Conflict Minerals',
                               'wikirate_link' => 'sec.gov',
                               'year' => 2021 })
puts sources