Using the GetSatisfaction API, how can I get the number of community members? I want to use this number to great a GitHub shield using Shields.io.
API: https://education.getsatisfaction.com/reference-guide/api/api-resources/
There are a number of endpoints and it looks like the following People endpoint should do what I want:
GET /companies/{community_id}/people.json
But when I call this, I don't get the right figure.
For example, the homepage of the RingCentral Community says 10,035 members but the following API only returns 933 people, where 102909 is the community_id as shown in View Source of the community page.
- API URL: http://api.getsatisfaction.com/companies/102909/people.json
- Web page URL: https://devcommunity.ringcentral.com
Source excerpt:
GSFN.Authenticatable.companyId = 102909;
I just figured this out. To get this number, call the Company API directly and look for the
approximate_people_countfigure:This will return a JSON object with the following property:
Once you have this, you can use the Shields.io
uri,query, andsuffixparameters as follows:uri=http%3A%2F%2Fapi.getsatisfaction.com%2Fcompanies%2F102909.jsonquery=$.approximate_people_countsuffix=%20members(optional, shown below)Put this together for:
https://img.shields.io/badge/dynamic/json.svg?label=community&colorB=&suffix=%20members&query=$.approximate_people_count&uri=http%3A%2F%2Fapi.getsatisfaction.com%2Fcompanies%2F102909.json