|
1 | | -# urlr@3.0.1 |
| 1 | +# urlr@3.0.2 |
2 | 2 |
|
3 | 3 |    |
4 | 4 |
|
5 | 5 | This SDK is automatically generated with the [OpenAPI Generator](https://openapi-generator.tech) project. |
6 | 6 |
|
7 | 7 | - API version: 2.0.0 |
8 | | -- Package version: 3.0.1 |
| 8 | +- Package version: 3.0.2 |
9 | 9 | - Build package: org.openapitools.codegen.languages.PythonClientCodegen |
10 | 10 |
|
11 | 11 | For more information, please visit [https://urlr.me/en](https://urlr.me/en) |
@@ -52,48 +52,25 @@ Please follow the [installation procedure](#installation--usage) and then run th |
52 | 52 | ```python |
53 | 53 | import os |
54 | 54 | import urlr |
55 | | -from urlr.rest import ApiException |
56 | 55 |
|
57 | | -username = os.getenv("URLR_API_USERNAME") # to be defined on your side |
58 | | -password = os.getenv("URLR_API_PASSWORD") # to be defined on your side |
59 | | - |
60 | | - |
61 | | -# Access Tokens |
| 56 | +api_key = os.getenv("URLR_API_KEY") # to be defined on your side |
62 | 57 |
|
63 | 58 | configuration = urlr.Configuration() |
64 | | - |
65 | | -with urlr.ApiClient(configuration) as api_client: |
66 | | - access_token_api = urlr.AccessTokensApi(api_client) |
67 | | - |
68 | | - create_access_token_request = urlr.CreateAccessTokenRequest( |
69 | | - username=username, |
70 | | - password=password, |
71 | | - ) |
72 | | - |
73 | | - try: |
74 | | - api_response = access_token_api.create_access_token( |
75 | | - create_access_token_request=create_access_token_request) |
76 | | - except ApiException as e: |
77 | | - print("Exception when calling AccessTokensApi->create_access_token: %s\n" % e) |
78 | | - quit() |
79 | | - |
80 | | -configuration.access_token = api_response.token |
| 59 | +configuration.api_key['ApiKeyAuth'] = api_key |
81 | 60 |
|
82 | 61 | # Create a link |
83 | 62 |
|
84 | 63 | with urlr.ApiClient(configuration) as api_client: |
85 | 64 | links_api = urlr.LinksApi(api_client) |
86 | | - create_link_request = urlr.CreateLinkRequest( |
| 65 | + link_create_request = urlr.LinkCreateRequest( |
87 | 66 | url="", |
88 | | - team_id="" |
| 67 | + workspace_id="" |
89 | 68 | ) |
90 | 69 |
|
91 | 70 | try: |
92 | | - link = links_api.create_link( |
93 | | - create_link_request=create_link_request) |
| 71 | + link = links_api.link_create(link_create_request=link_create_request) |
94 | 72 | except Exception as e: |
95 | | - print("Exception when calling LinksApi->create_link: %s\n" % e) |
96 | | - |
| 73 | + print("Exception when calling LinksApi->link_create: %s\n" % e) |
97 | 74 | ``` |
98 | 75 |
|
99 | 76 | Complete examples can be found in the [docs](https://github.com/URLR/urlr-python/tree/main/docs) directory of the client repository. |
|
0 commit comments