Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The notehub-py library is a Python implementation for communicating with the [Blues Notehub API](https://dev.blues.io/reference/notehub-api/api-introduction/)
generated by the [OpenAPI Generator](https://openapi-generator.tech) tool.

This library is auto-generated via the `openapi.yaml` file from the Blues Wireless Notehub project and published
This library is auto-generated via the `openapi.yaml` file from the Blues Notehub project and published
to [PyPI](https://pypi.org/project/notehub-py/) for ease of use in Python-based projects that need to interact with [Notehub.io][notehub].

## Table of Contents
Expand Down Expand Up @@ -63,6 +63,8 @@ Here's an example script to fetch all the devices associated with a Notehub proj

The `access_token` variable declared below is a Personal Access Token (PAT) required for all Notehub API requests.

<a id="personalAccessToken"></a>

**Creating a Personal Access Token**

To create a PAT:
Expand All @@ -75,7 +77,7 @@ To create a PAT:

Personal Access Tokens have the same permissions as your Notehub user account and should be stored securely like passwords. For more details, see the [Notehub API documentation on Personal Access Tokens](https://dev.blues.io/api-reference/notehub-api/api-introduction/#authentication-with-personal-access-tokens).

Once you have your PAT, supply it to the library by setting it equal to: `access_token = os.environ["BEARER_TOKEN"]` in the code.
Once you have your PAT, supply it to the library by replacing `PERSONAL_ACCESS_TOKEN` with your token in the code.

> **NOTE:** Be aware that all Notehub API calls made using the Notehub Py library utilize your account's [Consumption Credits](https://dev.blues.io/reference/glossary#consumption-credit) (CCs). For more information, please consult our [pricing page](https://blues.com/pricing/).

Expand All @@ -84,14 +86,8 @@ import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)

# Enter a context with an instance of the API client
Expand Down
14 changes: 1 addition & 13 deletions lib_template/python_doc_auth_partial.mustache
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# Defining the host is optional and defaults to {{{basePath}}}
# See configuration.py for a list of all supported configuration parameters.
configuration = {{{packageName}}}.Configuration(
host = "{{{basePath}}}"
)

{{#hasAuthMethods}}
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
{{#authMethods}}
{{#isBasic}}
{{#isBasicBasic}}
Expand All @@ -20,10 +10,8 @@ configuration = {{{packageName}}}.Configuration(
)
{{/isBasicBasic}}
{{#isBasicBearer}}

# Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}}
configuration = {{{packageName}}}.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)
{{/isBasicBearer}}
{{#isHttpSignature}}
Expand Down
14 changes: 1 addition & 13 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,8 @@ import notehub_py
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)


Expand Down
14 changes: 1 addition & 13 deletions src/docs/AlertApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,8 @@ from notehub_py.models.get_alerts200_response import GetAlerts200Response
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)

# Enter a context with an instance of the API client
Expand Down
12 changes: 0 additions & 12 deletions src/docs/AuthorizationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ from notehub_py.models.login_request import LoginRequest
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)


# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
Expand Down Expand Up @@ -78,12 +72,6 @@ from notehub_py.models.o_auth2_token_response import OAuth2TokenResponse
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)


# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
Expand Down
42 changes: 3 additions & 39 deletions src/docs/BillingAccountApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,8 @@ from notehub_py.models.get_billing_account200_response import GetBillingAccount2
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)

# Enter a context with an instance of the API client
Expand Down Expand Up @@ -89,20 +77,8 @@ from notehub_py.models.get_billing_account_balance_history200_response import Ge
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)

# Enter a context with an instance of the API client
Expand Down Expand Up @@ -158,20 +134,8 @@ from notehub_py.models.get_billing_accounts200_response import GetBillingAccount
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
# See configuration.py for a list of all supported configuration parameters.
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
access_token = "PERSONAL_ACCESS_TOKEN"
)

# Enter a context with an instance of the API client
Expand Down
Loading
Loading