Skip to content

Latest commit

 

History

History

greenpeace

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@datafire/greenpeace

Client library for Greenwire Public API

Installation and Usage

npm install --save @datafire/greenpeace
let greenpeace = require('@datafire/greenpeace').create();

.then(data => {
  console.log(data);
});

Description

Greenpeace Greenwire allows you connect with other volunteers, activists and groups working on environmental campaigns all across the world!

Actions

events.get

Return the upcoming events (e.g. start date >= today). Gets an array of Event object. Mandatory query param of domain determines the site / country the event belongs to.

greenpeace.events.get({
  "domain": ""
}, context)

Input

  • input object
    • domain required string: the site the groups belongs to, example: netherlands
    • limit string: the number of desired records

Output

events.UUID.get

Get one Event object by specifying its UUID in the url path.

greenpeace.events.UUID.get({
  "UUID": ""
}, context)

Input

  • input object
    • UUID required string

Output

groups.get

Gets an array of Group object. Mandatory query param of domain determines the site / country the group belongs to.

greenpeace.groups.get({
  "domain": ""
}, context)

Input

  • input object
    • domain required string: the site the groups belongs to, example: netherlands
    • limit string: the number of desired records

Output

groups.UUID.get

Get one Group object by specifying its UUID in the url path.

greenpeace.groups.UUID.get({
  "UUID": ""
}, context)

Input

  • input object
    • UUID required string

Output

volunteers.get

Gets an array of Volunteer object. Mandatory query param of domain determines the site / country the volunteers are from.

greenpeace.volunteers.get({
  "domain": ""
}, context)

Input

  • input object
    • domain required string: the site the users are registered on, example: netherlands
    • limit string: the number of desired records. Default is 5.
    • must_have_default_avatar boolean: 1 or 0. filter on people that have the default avatar or not.

Output

volunteers.UUID.get

Get one specific Volunteer object by specifying its UUID in the url path.

greenpeace.volunteers.UUID.get({
  "UUID": ""
}, context)

Input

  • input object
    • UUID required string

Output

Definitions

Coordinates

  • Coordinates object
    • latitude string: Signed decimal format, example: 52.1234
    • longitude string: Signed decimal format, example -77.022223

DateTime

  • DateTime string: The date in YYYY-MM-DD HH:MM:SS format, example: 2015-12-31 23:59:59

Event

Group

GroupLite

  • GroupLite object

GroupType

  • GroupType string (values: Country group, Campaign Project group, Local group, Discussion group, Interest group, Skills-based group)

HTML

  • HTML string: A string containing sanitized HTML code

HTTP_Code

HTTP_Status

HeaderError

HeaderSuccess

ISO_3166-1_alpha-2

Location

  • Location object
    • city string
    • coordinates Coordinates
    • country string
    • postcode string
    • state string
    • streetname string

LocationSimple

Pagination

  • Pagination object
    • limit integer: the nubmer of items per page
    • page integer: the current page
    • total integer: the total number of pages

ResourceType

  • ResourceType string (values: group, groups, event, events, volunteer, volunteers): The name of the requested object/model/resource. Plural if a collection.

Serial

  • Serial string: The primary key in Drupal, e.g the entity/node id

URL

UUID

  • UUID string: Universally unique identifier in canonical format, example: de305d54-75b4-431b-adb2-eb6b9e546014

Volunteer

VolunteerLite