winwinkit 0.7.0 copy "winwinkit: ^0.7.0" to clipboard
winwinkit: ^0.7.0 copied to clipboard

WinWinKit API Client for Dart

Changelog #

0.7.0 #

Regenerated against the latest OpenAPI spec. Additive — no breaking changes.

Added #

  • WinWinKit.affiliateAnalytics(from:to:limit:offset:) and the underlying AnalyticsApi.getAffiliateAnalytics (GET /analytics/affiliates). Requires a secret API key; a period may span at most 90 days, and results page 100 affiliates at a time.
  • WinWinKit.code(String) and the underlying CodesApi.getCode (GET /codes/{code}), which resolves a code to its type (affiliate, promo or referral) without an app user id.
  • UserClient.createAffiliateApplyLink(groupSlug:) and the underlying UsersApi.createAffiliateApplyLink (POST /users/{app_user_id}/affiliate-apply-link), returning a link that carries a short-lived token so the affiliate the user becomes is attributed back to them.
  • User.affiliate — the affiliate the user was recruited into on this app, or null if they are not one.
  • New models for the above: the AffiliateAnalytics*, AffiliatePlatform, Pagination and UserAffiliate* set; the Code, CodeAffiliate, CodeEntity, CodePromoCode, CodeReferralUser and CodeResponse set; and a Receiver*Reward* family alongside the existing ReferralProgramReceiver* one.
  • WinWinKit.rawCodes and WinWinKit.rawAnalytics escape hatches for the raw generated CodesApi and AnalyticsApi.

0.6.1 #

Regenerated against the latest OpenAPI spec.

Removed #

  • AppStoreOfferCode, AppStorePrice, AppStoreSubscription, OfferCodeResponse, and OfferCodeResponseData models — dropped from the spec. They were reachable via the package:winwinkit/winwinkit.dart barrel but not through the public facade, which never exposed AppStoreApi.

Fixed #

  • pubspec.yaml is now listed in .openapi-generator-ignore so re-running the generator no longer resets version and description.

0.6.0 #

Breaking changes. The SDK now exposes a hand-written, Dart-idiomatic facade instead of the raw generator output.

  • Package renamed from WinWinKit to winwinkit to satisfy pub.dev's lowercase-name requirement. Update imports from package:WinWinKit/WinWinKit.dart to package:winwinkit/winwinkit.dart. The public client class is still called WinWinKit.
  • Construct the client with WinWinKit(apiKey: '…') — the old pattern of instantiating WinWinKit() and calling .setApiKey('x-api-key', …) no longer applies.
  • Use scoped clients: sdk.user('<id>').registerAppStoreTransaction(...), .withdrawCredits(...), etc. The getUsersApi() / getClaimActionsApi() / getRewardsActionsApi() factories are gone.
  • Endpoint methods now take flat named parameters (no more hand-building request model objects) and return unwrapped domain values instead of Response<…DataResponse> wrappers.
  • AppStoreApi is no longer part of the public surface (getAppStoreApi() removed).
  • Response data is now validated: missing data payloads throw a descriptive StateError instead of surfacing as a null-dereference.

Added #

  • UsersApi.registerAppStoreTransaction and UsersApi.registerGooglePlayTransaction (generated against the latest OpenAPI spec).
  • RewardsActionsApi.grantReward and related request/response models.
  • Optional dio and basePathOverride constructor parameters for custom HTTP clients and alternative hosts.

Fixed #

  • Test files now import package:winwinkit/... instead of the stale package:openapi/....

Repository #

  • Added MIT LICENSE.
1
likes
120
points
79
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

WinWinKit API Client for Dart

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

built_collection, built_value, dio, one_of, one_of_serializer

More

Packages that depend on winwinkit