whatpulse-sdk
WhatpulseSdk - the Ruby gem for the WhatPulse API
Public API for WhatPulse user data access. This API allows authenticated users to access their own data and public data from other users, depending on privacy settings.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
shell
gem build whatpulse-sdk.gemspec
Then either install the gem locally:
shell
gem install ./whatpulse-sdk-1.0.0.gem
(for development, run gem install --dev ./whatpulse-sdk-1.0.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'whatpulse-sdk', '~> 1.0.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'whatpulse-sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
shell
ruby -Ilib script.rb
API Key
To use the WhatPulse API, you’ll need an API key. You can generate one by visiting: https://whatpulse.org/go/settings-api-keys
Getting Started
Please follow the installation procedure and then run the following code:
```ruby # Load the gem require ‘whatpulse-sdk’
Setup authorization
WhatpulseSdk.configure do |config| # Configure Bearer authorization: http config.access_token = ‘YOUR_BEARER_TOKEN’ # Configure a proc to get access tokens in lieu of the static access_token configuration config.access_token_getter = -> { ‘YOUR TOKEN GETTER PROC’ } end
api_instance = WhatpulseSdk::ComputersApi.new id = ‘id_example’ # String | User ID or username opts = { is_archived: ‘is_archived_example’ # String | Get filter parameters }
begin #Get user computers result = api_instance.v1_users_computers(id, opts) p result rescue WhatpulseSdk::ApiError => e puts “Exception when calling ComputersApi->v1_users_computers: #e” end
```
Documentation for API Endpoints
All URIs are relative to https://whatpulse.org/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| WhatpulseSdk::ComputersApi | v1_users_computers | GET /users/id/computers | Get user computers |
| WhatpulseSdk::MembersApi | v1_teams_members | GET /teams/team_id/members | Get team members |
| WhatpulseSdk::ProfilesApi | v1_users_profiles | GET /users/id/profiles | Get user profiles |
| WhatpulseSdk::PulsesApi | v1_users_pulses | GET /users/id/pulses | Get user pulses |
| WhatpulseSdk::SubteamMembersApi | v1_teams_subteams_members | GET /teams/team_id/subteams/subteam_id/members | Get subteam members |
| WhatpulseSdk::SubteamsApi | v1_teams_subteams | GET /teams/team_id/subteams | Get team subteams |
| WhatpulseSdk::SubteamsApi | v1_teams_subteams_show | GET /teams/team_id/subteams/subteam_id | Get subteam details |
| WhatpulseSdk::TeamsApi | v1_teams_index | GET /teams | Search teams |
| WhatpulseSdk::TeamsApi | v1_teams_show | GET /teams/team_id | Get team details |
| WhatpulseSdk::TimeSeriesApi | v1_users_time_series | GET /users/id/time-series | Get user time series |
| WhatpulseSdk::UsersApi | v1_users_index | GET /users | Search users |
| WhatpulseSdk::UsersApi | v1_users_show | GET /users/id | Get user details |
Documentation for Models
- WhatpulseSdk::ClientProfileResource
- WhatpulseSdk::ClientProfileResourceComputer
- WhatpulseSdk::ComputerResource
- WhatpulseSdk::ComputerResourceHardware
- WhatpulseSdk::ComputerResourceHardwareAnyOf
- WhatpulseSdk::ComputerResourceHardwareAnyOf1
- WhatpulseSdk::ComputerResourceHardwareAnyOfPeripherals
- WhatpulseSdk::ComputerResourceHardwareAnyOfSystem
- WhatpulseSdk::ComputerResourceTotals
- WhatpulseSdk::DetailedSubteamResource
- WhatpulseSdk::DetailedSubteamResourceLinks
- WhatpulseSdk::DetailedSubteamResourceTotals
- WhatpulseSdk::ErrorResource
- WhatpulseSdk::InlineObject
- WhatpulseSdk::InlineObject1
- WhatpulseSdk::LinksResource
- WhatpulseSdk::PaginationResource
- WhatpulseSdk::PulseResource
- WhatpulseSdk::SubteamResource
- WhatpulseSdk::TeamListResource
- WhatpulseSdk::TeamResource
- WhatpulseSdk::TeamResourceLinks
- WhatpulseSdk::TeamResourceRanks
- WhatpulseSdk::TeamResourceTotals
- WhatpulseSdk::TimeSeriesResource
- WhatpulseSdk::TimeSeriesResourceDistanceMiles
- WhatpulseSdk::UserListResource
- WhatpulseSdk::UserResource
- WhatpulseSdk::UserResourceLastPulse
- WhatpulseSdk::UserResourceRanks
- WhatpulseSdk::UserResourceTotals
- WhatpulseSdk::V1TeamsIndex200Response
- WhatpulseSdk::V1TeamsIndex200ResponseFilters
- WhatpulseSdk::V1TeamsMembers200Response
- WhatpulseSdk::V1TeamsShow200Response
- WhatpulseSdk::V1TeamsShow200ResponseAnyOf
- WhatpulseSdk::V1TeamsSubteams200Response
- WhatpulseSdk::V1TeamsSubteamsMembers200Response
- WhatpulseSdk::V1TeamsSubteamsShow200Response
- WhatpulseSdk::V1TeamsSubteamsShow200ResponseAnyOf
- WhatpulseSdk::V1UsersComputers200Response
- WhatpulseSdk::V1UsersComputers200ResponseFilters
- WhatpulseSdk::V1UsersIndex200Response
- WhatpulseSdk::V1UsersProfiles200Response
- WhatpulseSdk::V1UsersProfiles200ResponseFilters
- WhatpulseSdk::V1UsersPulses200Response
- WhatpulseSdk::V1UsersPulses200ResponseFilters
- WhatpulseSdk::V1UsersShow200Response
- WhatpulseSdk::V1UsersShow200ResponseAnyOf
- WhatpulseSdk::V1UsersTimeSeries200Response
- WhatpulseSdk::V1UsersTimeSeries200ResponseFilters
Documentation for Authorization
Authentication schemes defined for the API: ### http
- Type: Bearer authentication