Skip to content

Latest commit

 

History

History
151 lines (106 loc) · 3.63 KB

File metadata and controls

151 lines (106 loc) · 3.63 KB

WhatpulseSdk::TeamsApi

All URIs are relative to https://whatpulse.test/api/v1

Method HTTP request Description
v1_teams_index GET /teams Search teams
v1_teams_show GET /teams/{team_id} Get team details

v1_teams_index

v1_teams_index(opts)

Search teams

Search for teams by name. Returns a paginated list of teams matching the search criteria. Only public team information (ID and name) is returned. The search is case-insensitive and matches partial team names.

Examples

require 'time'
require 'whatpulse-sdk'
# setup authorization
WhatpulseSdk.configure do |config|
  # Configure Bearer authorization: http
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = WhatpulseSdk::TeamsApi.new
opts = {
  search: 'search_example', # String | 
  per_page: 'per_page_example' # String | 
}

begin
  # Search teams
  result = api_instance.v1_teams_index(opts)
  p result
rescue WhatpulseSdk::ApiError => e
  puts "Error when calling TeamsApi->v1_teams_index: #{e}"
end

Using the v1_teams_index_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> v1_teams_index_with_http_info(opts)

begin
  # Search teams
  data, status_code, headers = api_instance.v1_teams_index_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <V1TeamsIndex200Response>
rescue WhatpulseSdk::ApiError => e
  puts "Error when calling TeamsApi->v1_teams_index_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
search String [optional]
per_page String [optional]

Return type

V1TeamsIndex200Response

Authorization

http

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

v1_teams_show

v1_teams_show(team_id)

Get team details

Get detailed information about a specific team. Returns public profile information that can be viewed by anyone.

Examples

require 'time'
require 'whatpulse-sdk'
# setup authorization
WhatpulseSdk.configure do |config|
  # Configure Bearer authorization: http
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = WhatpulseSdk::TeamsApi.new
team_id = 'team_id_example' # String | Team ID, name or slug

begin
  # Get team details
  result = api_instance.v1_teams_show(team_id)
  p result
rescue WhatpulseSdk::ApiError => e
  puts "Error when calling TeamsApi->v1_teams_show: #{e}"
end

Using the v1_teams_show_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> v1_teams_show_with_http_info(team_id)

begin
  # Get team details
  data, status_code, headers = api_instance.v1_teams_show_with_http_info(team_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <V1TeamsShow200Response>
rescue WhatpulseSdk::ApiError => e
  puts "Error when calling TeamsApi->v1_teams_show_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
team_id String Team ID, name or slug

Return type

V1TeamsShow200Response

Authorization

http

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json