Skip to content

Commit e88f509

Browse files
committed
Sync with dub api
1 parent 17326b9 commit e88f509

19 files changed

+151
-901
lines changed

.openapi-generator/FILES

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ doc/DeleteLink200Response.md
1313
doc/DomainSchema.md
1414
doc/DomainsApi.md
1515
doc/EditDomainRequest.md
16-
doc/EditLinkRequest.md
1716
doc/GetBrowserAnalytics200ResponseInner.md
1817
doc/GetCityAnalytics200ResponseInner.md
1918
doc/GetCountryAnalytics200ResponseInner.md
@@ -78,7 +77,6 @@ lib/src/model/delete_domain200_response.dart
7877
lib/src/model/delete_link200_response.dart
7978
lib/src/model/domain_schema.dart
8079
lib/src/model/edit_domain_request.dart
81-
lib/src/model/edit_link_request.dart
8280
lib/src/model/get_browser_analytics200_response_inner.dart
8381
lib/src/model/get_city_analytics200_response_inner.dart
8482
lib/src/model/get_country_analytics200_response_inner.dart
@@ -126,7 +124,6 @@ test/delete_link200_response_test.dart
126124
test/domain_schema_test.dart
127125
test/domains_api_test.dart
128126
test/edit_domain_request_test.dart
129-
test/edit_link_request_test.dart
130127
test/get_browser_analytics200_response_inner_test.dart
131128
test/get_city_analytics200_response_inner_test.dart
132129
test/get_country_analytics200_response_inner_test.dart

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
## 0.0.1
22

33
- Initial version of dub package
4+
5+
## 0.0.2
6+
7+
- Added example usage
8+
- Synced with latest version of `dub` api

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ Dub is link management infrastructure for companies to create marketing campaign
66

77
For more information, please visit [https://dub.co/api](https://dub.co/api)
88

9-
## Requirements
10-
11-
- Dart 2.15.0+ or Flutter 2.8.0+
12-
- Dio 5.0.0+ (https://pub.dev/packages/dio)
13-
- JSON Serializable 6.1.5+ (https://pub.dev/packages/json_serializable)
14-
159
## Installation & Usage
1610

1711
### pub.dev
@@ -129,7 +123,6 @@ All URIs are relative to *https://api.dub.co*
129123
- [DeleteLink200Response](doc/DeleteLink200Response.md)
130124
- [DomainSchema](doc/DomainSchema.md)
131125
- [EditDomainRequest](doc/EditDomainRequest.md)
132-
- [EditLinkRequest](doc/EditLinkRequest.md)
133126
- [GetBrowserAnalytics200ResponseInner](doc/GetBrowserAnalytics200ResponseInner.md)
134127
- [GetCityAnalytics200ResponseInner](doc/GetCityAnalytics200ResponseInner.md)
135128
- [GetCountryAnalytics200ResponseInner](doc/GetCountryAnalytics200ResponseInner.md)

doc/EditLinkRequest.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

doc/LinksApi.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Method | HTTP request | Description
1919

2020

2121
# **bulkCreateLinks**
22-
> List<LinkSchema> bulkCreateLinks(workspaceId, projectSlug, editLinkRequest)
22+
> List<LinkSchema> bulkCreateLinks(workspaceId, projectSlug, createLinkRequest)
2323
2424
Bulk create links
2525

@@ -32,10 +32,10 @@ import 'package:dub/api.dart';
3232
final api = Dub().getLinksApi();
3333
final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
3434
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
35-
final List<EditLinkRequest> editLinkRequest = ; // List<EditLinkRequest> |
35+
final List<CreateLinkRequest> createLinkRequest = ; // List<CreateLinkRequest> |
3636
3737
try {
38-
final response = api.bulkCreateLinks(workspaceId, projectSlug, editLinkRequest);
38+
final response = api.bulkCreateLinks(workspaceId, projectSlug, createLinkRequest);
3939
print(response);
4040
} catch on DioException (e) {
4141
print('Exception when calling LinksApi->bulkCreateLinks: $e\n');
@@ -48,7 +48,7 @@ Name | Type | Description | Notes
4848
------------- | ------------- | ------------- | -------------
4949
**workspaceId** | **String**| The ID of the workspace. |
5050
**projectSlug** | **String**| The slug of the project. This field is deprecated – use `workspaceId` instead. | [optional]
51-
**editLinkRequest** | [**List&lt;EditLinkRequest&gt;**](EditLinkRequest.md)| | [optional]
51+
**createLinkRequest** | [**List&lt;CreateLinkRequest&gt;**](CreateLinkRequest.md)| | [optional]
5252

5353
### Return type
5454

@@ -160,7 +160,7 @@ Name | Type | Description | Notes
160160
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
161161

162162
# **editLink**
163-
> LinkSchema editLink(linkId, workspaceId, projectSlug, editLinkRequest)
163+
> LinkSchema editLink(linkId, workspaceId, projectSlug, createLinkRequest)
164164
165165
Edit a link
166166

@@ -174,10 +174,10 @@ final api = Dub().getLinksApi();
174174
final String linkId = linkId_example; // String | The id of the link to edit. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.
175175
final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
176176
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
177-
final EditLinkRequest editLinkRequest = ; // EditLinkRequest |
177+
final CreateLinkRequest createLinkRequest = ; // CreateLinkRequest |
178178
179179
try {
180-
final response = api.editLink(linkId, workspaceId, projectSlug, editLinkRequest);
180+
final response = api.editLink(linkId, workspaceId, projectSlug, createLinkRequest);
181181
print(response);
182182
} catch on DioException (e) {
183183
print('Exception when calling LinksApi->editLink: $e\n');
@@ -191,7 +191,7 @@ Name | Type | Description | Notes
191191
**linkId** | **String**| The id of the link to edit. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. |
192192
**workspaceId** | **String**| The ID of the workspace. |
193193
**projectSlug** | **String**| The slug of the project. This field is deprecated – use `workspaceId` instead. | [optional]
194-
**editLinkRequest** | [**EditLinkRequest**](EditLinkRequest.md)| | [optional]
194+
**createLinkRequest** | [**CreateLinkRequest**](CreateLinkRequest.md)| | [optional]
195195

196196
### Return type
197197

@@ -273,8 +273,8 @@ final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
273273
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
274274
final String domain = domain_example; // String | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.
275275
final String tagId = tagId_example; // String | The tag ID to filter the links by. This field is deprecated – use `tagIds` instead.
276-
final String tagIds = tagIds_example; // String | The tag IDs to filter the links by.
277-
final String tagNames = tagNames_example; // String | The unique name of the tags assigned to the short link (case insensitive).
276+
final List<String> tagIds = ; // List<String> | The tag IDs to filter the links by.
277+
final List<String> tagNames = ; // List<String> | The unique name of the tags assigned to the short link (case insensitive).
278278
final String search = search_example; // String | The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
279279
final String userId = userId_example; // String | The user ID to filter the links by.
280280
final bool showArchived = true; // bool | Whether to include archived links in the response. Defaults to `false` if not provided.
@@ -298,8 +298,8 @@ Name | Type | Description | Notes
298298
**projectSlug** | **String**| The slug of the project. This field is deprecated – use `workspaceId` instead. | [optional]
299299
**domain** | **String**| The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. | [optional]
300300
**tagId** | **String**| The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. | [optional]
301-
**tagIds** | **String**| The tag IDs to filter the links by. | [optional]
302-
**tagNames** | **String**| The unique name of the tags assigned to the short link (case insensitive). | [optional]
301+
**tagIds** | [**List&lt;String&gt;**](String.md)| The tag IDs to filter the links by. | [optional]
302+
**tagNames** | [**List&lt;String&gt;**](String.md)| The unique name of the tags assigned to the short link (case insensitive). | [optional]
303303
**search** | **String**| The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | [optional]
304304
**userId** | **String**| The user ID to filter the links by. | [optional]
305305
**showArchived** | **bool**| Whether to include archived links in the response. Defaults to `false` if not provided. | [optional] [default to false]
@@ -338,13 +338,13 @@ final String workspaceId = ws_cluuwcv0r...; // String | The ID of the workspace.
338338
final String projectSlug = projectSlug_example; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
339339
final String domain = domain_example; // String | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.
340340
final String tagId = tagId_example; // String | The tag ID to filter the links by. This field is deprecated – use `tagIds` instead.
341-
final String tagIds = tagIds_example; // String | The tag IDs to filter the links by.
342-
final String tagNames = tagNames_example; // String | The unique name of the tags assigned to the short link (case insensitive).
341+
final List<String> tagIds = ; // List<String> | The tag IDs to filter the links by.
342+
final List<String> tagNames = ; // List<String> | The unique name of the tags assigned to the short link (case insensitive).
343343
final String search = search_example; // String | The search term to filter the links by. The search term will be matched against the short link slug and the destination url.
344344
final String userId = userId_example; // String | The user ID to filter the links by.
345345
final bool showArchived = true; // bool | Whether to include archived links in the response. Defaults to `false` if not provided.
346346
final bool withTags = true; // bool | Whether to include tags in the response. Defaults to `false` if not provided.
347-
final String groupBy = groupBy_example; // String | The field to group the links by.
347+
final List<String> groupBy = ; // List<String> | The field to group the links by.
348348
349349
try {
350350
final response = api.getLinksCount(workspaceId, projectSlug, domain, tagId, tagIds, tagNames, search, userId, showArchived, withTags, groupBy);
@@ -362,13 +362,13 @@ Name | Type | Description | Notes
362362
**projectSlug** | **String**| The slug of the project. This field is deprecated – use `workspaceId` instead. | [optional]
363363
**domain** | **String**| The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. | [optional]
364364
**tagId** | **String**| The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. | [optional]
365-
**tagIds** | **String**| The tag IDs to filter the links by. | [optional]
366-
**tagNames** | **String**| The unique name of the tags assigned to the short link (case insensitive). | [optional]
365+
**tagIds** | [**List&lt;String&gt;**](String.md)| The tag IDs to filter the links by. | [optional]
366+
**tagNames** | [**List&lt;String&gt;**](String.md)| The unique name of the tags assigned to the short link (case insensitive). | [optional]
367367
**search** | **String**| The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | [optional]
368368
**userId** | **String**| The user ID to filter the links by. | [optional]
369369
**showArchived** | **bool**| Whether to include archived links in the response. Defaults to `false` if not provided. | [optional] [default to false]
370370
**withTags** | **bool**| Whether to include tags in the response. Defaults to `false` if not provided. | [optional] [default to false]
371-
**groupBy** | **String**| The field to group the links by. | [optional]
371+
**groupBy** | [**List&lt;String&gt;**](String.md)| The field to group the links by. | [optional]
372372

373373
### Return type
374374

example/lib/help-page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter/widgets.dart';
32

43
class HelpPage extends StatelessWidget {
54
const HelpPage({super.key});

example/lib/my-short-links.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:example/widget/link-detail-card.dart';
88
import 'package:example/widget/title_action_widget.dart';
99
import 'package:flutter/material.dart';
1010
import 'package:flutter/services.dart';
11-
import 'package:flutter/widgets.dart';
1211
import 'package:url_launcher/url_launcher.dart';
1312

1413
class MyShortLinks extends StatefulWidget {

example/lib/widget/create_link_card.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class _CreateLinkCArdState extends State<CreateLinkCArd> {
267267
onPressed: () {
268268
if (link?.shortLink != null) {
269269
Clipboard.setData(
270-
ClipboardData(text: link!.shortLink!));
270+
ClipboardData(text: link!.shortLink));
271271
ScaffoldMessenger.of(context).showSnackBar(
272272
const SnackBar(
273273
content: Text('Copied to clipboard'),

lib/dub.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export 'package:dub/src/model/delete_domain200_response.dart';
2525
export 'package:dub/src/model/delete_link200_response.dart';
2626
export 'package:dub/src/model/domain_schema.dart';
2727
export 'package:dub/src/model/edit_domain_request.dart';
28-
export 'package:dub/src/model/edit_link_request.dart';
2928
export 'package:dub/src/model/get_browser_analytics200_response_inner.dart';
3029
export 'package:dub/src/model/get_city_analytics200_response_inner.dart';
3130
export 'package:dub/src/model/get_country_analytics200_response_inner.dart';

0 commit comments

Comments
 (0)