winwinkit 0.7.0
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 underlyingAnalyticsApi.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 underlyingCodesApi.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 underlyingUsersApi.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, ornullif they are not one.- New models for the above: the
AffiliateAnalytics*,AffiliatePlatform,PaginationandUserAffiliate*set; theCode,CodeAffiliate,CodeEntity,CodePromoCode,CodeReferralUserandCodeResponseset; and aReceiver*Reward*family alongside the existingReferralProgramReceiver*one. WinWinKit.rawCodesandWinWinKit.rawAnalyticsescape hatches for the raw generatedCodesApiandAnalyticsApi.
0.6.1 #
Regenerated against the latest OpenAPI spec.
Removed #
AppStoreOfferCode,AppStorePrice,AppStoreSubscription,OfferCodeResponse, andOfferCodeResponseDatamodels — dropped from the spec. They were reachable via thepackage:winwinkit/winwinkit.dartbarrel but not through the public facade, which never exposedAppStoreApi.
Fixed #
pubspec.yamlis now listed in.openapi-generator-ignoreso re-running the generator no longer resetsversionanddescription.
0.6.0 #
Breaking changes. The SDK now exposes a hand-written, Dart-idiomatic facade instead of the raw generator output.
- Package renamed from
WinWinKittowinwinkitto satisfy pub.dev's lowercase-name requirement. Update imports frompackage:WinWinKit/WinWinKit.darttopackage:winwinkit/winwinkit.dart. The public client class is still calledWinWinKit. - Construct the client with
WinWinKit(apiKey: '…')— the old pattern of instantiatingWinWinKit()and calling.setApiKey('x-api-key', …)no longer applies. - Use scoped clients:
sdk.user('<id>').registerAppStoreTransaction(...),.withdrawCredits(...), etc. ThegetUsersApi()/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. AppStoreApiis no longer part of the public surface (getAppStoreApi()removed).- Response data is now validated: missing
datapayloads throw a descriptiveStateErrorinstead of surfacing as a null-dereference.
Added #
UsersApi.registerAppStoreTransactionandUsersApi.registerGooglePlayTransaction(generated against the latest OpenAPI spec).RewardsActionsApi.grantRewardand related request/response models.- Optional
dioandbasePathOverrideconstructor parameters for custom HTTP clients and alternative hosts.
Fixed #
- Test files now import
package:winwinkit/...instead of the stalepackage:openapi/....
Repository #
- Added MIT
LICENSE.