Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.83 KB

File metadata and controls

47 lines (34 loc) · 1.83 KB

Get Topics

Topics are a way to organize Metrics and other content into thematic groups.

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_topics 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:

  • name: returns topics that contain in their name the given string

  • topic_framework: returns topics based on the defined Topic Framework, allowed paremeter values:

    • Wikirate ESG Topics
    • ESRS Standards
    • GRI Standards
    • UN SDGs
  • bookmark: returns the topics you have bookmarked, allowed parameter values:

    • bookmark
    • nobookmark

In the example below, we are looking for topics that contain on their name the string environment.

topics = client.get_topics({ 'name' => 'environment' })
puts topics

In the example below, we are looking for topics under the GRI Standards framework.

topics = client.get_topics({ 'topic_framework' => 'GRI Standards' })
puts topics