adalib.adaboard
¶
The Adaboard sub-package exposes the core integrations with the Adaboard API.
Functions¶
build_request_url ¶
Build the URL to hit adaboard on.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The relative path to hit adaboard on. |
required |
Returns:
Type | Description |
---|---|
str
|
The complete URL to hit adaboard on. |
Source code in adalib/adaboard/adaboard.py
get_all_pages ¶
Fetch all pages of data from a paginated API and return the combined results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_url |
str
|
The base API URL to request data from. |
required |
params |
dict
|
Additional query parameters for the API request. |
None
|
Returns:
Type | Description |
---|---|
list[dict]
|
A list of items from all pages. |
Source code in adalib/adaboard/adaboard.py
get_user ¶
Get user data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_id |
str
|
User ID |
required |
include_notification_preferences |
bool
|
Flag whether the notification preferences should be included |
False
|
Source code in adalib/adaboard/adaboard.py
request_adaboard ¶
Function to hit the adaboard api at the specified url and raise for error on response.
Note: All kwargs passed are directly sent through to the request function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
path to hit adaboard on (base url will be injected automatically) |
required |
method |
function, optional
|
method to use to query adaboard, defaults to requests.get |
get
|
Returns:
Type | Description |
---|---|
response
|
response from adaboard |