dub 0.0.1 copy "dub: ^0.0.1" to clipboard
dub: ^0.0.1 copied to clipboard

Unofficial Dub.co SDK

dub (EXPERIMENTAL) #

Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.

  • API version: 0.0.1

For more information, please visit https://dub.co/api

Requirements #

Installation & Usage #

pub.dev #

To use the package from pub.dev, please include the following in pubspec.yaml

dependencies:
  dub: 0.0.1

Github #

To use this package from Github, please include the following in pubspec.yaml

dependencies:
  dub:
    git:
      url: https://github.com/thealphamerc/dub-dart.git
      #ref: main

Local development #

To use the package from your local drive, please include the following in pubspec.yaml

dependencies:
  dub:
    path: /path/to/dub

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:dub/dub.dart';


final api = Dub().getAnalyticsApi();
final String workspaceId = "ws_cluuwcv0r..."; // String | The ID of the workspace.
final String projectSlug = "projectSlug_example"; // String | The slug of the project. This field is deprecated – use `workspaceId` instead.
final String domain = "domain_example"; // String | The domain of the short link.
final String key = "key_example"; // String | The short link slug.
final String linkId = "linkId_example"; // String | The unique ID of the short link on Dub.
final String externalId = "externalId_example"; // String | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
final String interval = "interval_example"; // String | The interval to retrieve analytics for.
final String country = "country_example"; // String | The country to retrieve analytics for.
final String city = "city_example"; // String | The city to retrieve analytics for.
final String device = "device_example"; // String | The device to retrieve analytics for.
final String browser = "browser_example"; // String | The browser to retrieve analytics for.
final String os = "os_example"; // String | The OS to retrieve analytics for.
final String referer = "referer_example"; // String | The referer to retrieve analytics for.
final String url = "url_example"; // String | The URL to retrieve analytics for.
final String tagId = "tagId_example"; // String | The tag ID to retrieve analytics for.
final bool qr = true; // bool | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.
final bool root = true; // bool | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.

try {
    final response = await api.getBrowserAnalytics(workspaceId, projectSlug, domain, key, linkId, externalId, interval, country, city, device, browser, os, referer, url, tagId, qr, root);
    print(response);
} catch on DioException (e) {
    print("Exception when calling AnalyticsApi->getBrowserAnalytics: $e\n");
}

Documentation for API Endpoints #

All URIs are relative to https://api.dub.co

Class Method HTTP request Description
AnalyticsApi getBrowserAnalytics GET /analytics/browser Retrieve browser analytics
AnalyticsApi getCityAnalytics GET /analytics/city Retrieve city analytics
AnalyticsApi getClicksAnalytics GET /analytics/clicks Retrieve clicks analytics
AnalyticsApi getCountryAnalytics GET /analytics/country Retrieve country analytics
AnalyticsApi getDeviceAnalytics GET /analytics/device Retrieve device analytics
AnalyticsApi getOSAnalytics GET /analytics/os Retrieve OS analytics
AnalyticsApi getRefererAnalytics GET /analytics/referer Retrieve referer analytics
AnalyticsApi getTimeseriesAnalytics GET /analytics/timeseries Retrieve timeseries analytics
AnalyticsApi getTopLinks GET /analytics/top_links Retrieve top links
AnalyticsApi getTopURLs GET /analytics/top_urls Retrieve top URLs
DomainsApi addDomain POST /domains Add a domain
DomainsApi deleteDomain DELETE /domains/{slug} Delete a domain
DomainsApi editDomain PATCH /domains/{slug} Edit a domain
DomainsApi listDomains GET /domains Retrieve a list of domains
DomainsApi setPrimaryDomain POST /domains/{slug}/primary Set a domain as primary
DomainsApi transferDomain POST /domains/{slug}/transfer Transfer a domain
LinksApi bulkCreateLinks POST /links/bulk Bulk create links
LinksApi createLink POST /links Create a new link
LinksApi deleteLink DELETE /links/{linkId} Delete a link
LinksApi editLink PUT /links/{linkId} Edit a link
LinksApi getLinkInfo GET /links/info Retrieve a link
LinksApi getLinks GET /links Retrieve a list of links
LinksApi getLinksCount GET /links/count Retrieve the number of links
MetatagsApi getMetatags GET /metatags Retrieve the metatags for a URL
QRCodesApi getQRCode GET /qr Retrieve a QR code
TagsApi createTag POST /tags Create a new tag
TagsApi getTags GET /tags Retrieve a list of tags
WorkspacesApi createWorkspace POST /workspaces Create a workspace
WorkspacesApi getWorkspace GET /workspaces/{idOrSlug} Retrieve a workspace
WorkspacesApi getWorkspaces GET /workspaces Retrieve a list of workspaces

Documentation For Models #

Documentation For Authorization #

Authentication schemes defined for the API:

token #

  • Type: HTTP Bearer Token authentication

Author #

support@dub.co

1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Unofficial Dub.co SDK

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, json_annotation

More

Packages that depend on dub