Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 2.38 KB

Update Source.md

File metadata and controls

61 lines (49 loc) · 2.38 KB

Update Source

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

WikiRate's REST API allows you to update existing sources. wikirate4ruby provides the method update_source to allow users to update such sources. The method takes as an input a number of parameters where all the information about the source is defined. The parameters can be split into required and optional.

required params:

  • source: source name/id

optional params:

  • link: the url of the source we want to update

  • company: the company name/id, the source is referring to

  • year: citation year of the report/source

  • report_type: specified 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'

The example below demonstrates how to update an existing source:

updated_source = client.add_source({ 'source' => 'Source-000171202',
                                     'title' => 'Nike Inc.\'s Conflict Minerals Report for 2021' })