Versions in this module Expand all Collapse all v0 v0.8.1 Sep 2, 2022 v0.8.0 Sep 2, 2022 Changes in this version type Client + GetAllTrialsInfo func() (Transactions, error) + GetTrialsInfo func(beginDate, endDate YearMonthDay) (Transactions, error) + type CountryTransactions struct + Country string + Transactions Transactions + type CustomerTransactionMap map[CustomerID]Transactions + func (t CustomerTransactionMap) RetainCustomers(retained []Customer) CustomerTransactionMap + type DateGroupedTransactions struct + Date YearMonthDay + Transactions Transactions + type Transaction struct + Customer Customer + Date YearMonthDay + ReferenceID string + func NewTransaction(refId string, date YearMonthDay, customer Customer) Transaction + type Transactions []Transaction + func (t Transactions) Before(date time.Time) Transactions + func (t Transactions) ByYearMonth(month YearMonth) Transactions + func (t Transactions) FilterBy(keep func(transaction Transaction) bool) Transactions + func (t Transactions) GroupByCountry() []CountryTransactions + func (t Transactions) GroupByCustomer() CustomerTransactionMap + func (t Transactions) GroupByDate(newestDateFirst bool) []DateGroupedTransactions + func (t Transactions) SortedByDate() Transactions v0.7.0 Jul 13, 2022 v0.6.0 Sep 8, 2021 Changes in this version type ChurnedCustomerList + func (c ChurnedCustomerList) Customers() Customers type Client + GetCurrentPluginRating func() (Rating, error) + GetPluginRating func(id string) (Rating, error) + type Rating struct + MeanRating float64 + MeanVotes int + UserRating int + Votes map[string]int + func (r Rating) CalculateRating() float64 + func (r Rating) VotesCount() int + func (r Rating) VotesSum() int type Sales + func (s Sales) ByReturnedCustomers(previouslyChurned ChurnedCustomerList) Sales v0.5.0 May 6, 2021 Changes in this version + const AccountTypeOrganization + const AccountTypePersonal + const AnnualSubscription + const MonthlySubscription + var ServerTimeZone = time.LoadLocation("Europe/Berlin") + func FeePercentage(date time.Time) float64 + func PaidOutPercentage(date time.Time) float64 + type AccountType string + type Amount float64 + func (a Amount) Format() string + func (a Amount) IsZero() bool + type ChurnedCustomer struct + FreeSubscription bool + LastPurchase YearMonthDay + Subscription Subscription + func (c ChurnedCustomer) PaidDuration(first YearMonthDay) string + type ChurnedCustomerList []ChurnedCustomer + type ChurnedCustomers struct + ActiveUserCount int + ChurnedCustomers []ChurnedCustomer + func NewChurnedCustomers(customers []ChurnedCustomer) ChurnedCustomers + func (c ChurnedCustomers) ChurnRatePercentage() float64 + func (c ChurnedCustomers) Contains(id CustomerID) bool + func (c ChurnedCustomers) Count() int + func (c ChurnedCustomers) CountAnnual() int + func (c ChurnedCustomers) CountMonthly() int + func (c ChurnedCustomers) Customers() Customers + func (c ChurnedCustomers) GroupByPaidDuration(first CustomerDateMap) []NumberedGroup + func (c ChurnedCustomers) IsNotEmpty() bool + func (c ChurnedCustomers) SortedByDate() ChurnedCustomerList + func (c ChurnedCustomers) SortedByDayOfMonth() ChurnedCustomerList + type Client interface + Downloads func(period string, uniqueDownloads bool, ...) (DownloadResponse, error) + DownloadsDaily func(uniqueDownloads bool, ...) ([]DownloadAndDate, error) + DownloadsMonthly func(uniqueDownloads bool, ...) ([]DownloadMonthly, error) + DownloadsWeekly func(uniqueDownloads bool, ...) ([]DownloadAndDate, error) + GetAllSalesInfo func() (Sales, error) + GetCurrentPluginInfo func() (PluginInfo, error) + GetJSON func(path string, params map[string]string, target interface{}) error + GetPluginInfo func(id string) (PluginInfo, error) + GetSalesInfo func(beginDate, endDate YearMonthDay) (Sales, error) + func NewClient(pluginID, token string) Client + type CountrySales struct + Country string + Sales Sales + TotalUSD Amount + type Currency string + type CurrencySales struct + Currency Currency + Sales Sales + TotalSales Amount + TotalSalesUSD Amount + type Customer struct + Country string + ID CustomerID + Name string + Type AccountType + func NewCustomer(id CustomerID, name, country string, accountType AccountType) Customer + func (c Customer) String() string + type CustomerDateMap map[CustomerID]YearMonthDay + type CustomerID int + type CustomerSales struct + Customer Customer + Sales Sales + TotalUSD Amount + func (c *CustomerSales) FirstPurchase() YearMonthDay + func (c *CustomerSales) LatestPurchase() time.Time + type CustomerSalesMap map[CustomerID]*CustomerSales + func (m CustomerSalesMap) GroupByPaidMonths(customers Customers, before time.Time) []NumberedGroup + func (m CustomerSalesMap) PaidMonths(id CustomerID, before time.Time) int + func (m CustomerSalesMap) TotalSales(id CustomerID) Amount + type Customers []Customer + func (c Customers) AsMap() CustomersMap + func (c Customers) GroupByCountry() []GroupedCustomers + func (c Customers) SortByDateMapping(mapping CustomerDateMap) Customers + func (c Customers) SortByID() Customers + type CustomersMap map[CustomerID]Customer + func (m CustomersMap) Without(customersMap CustomersMap) CustomersMap + type DateGroupedSales struct + Date YearMonthDay + Name string + Sales Sales + TotalUSD Amount + type DownloadAndDate struct + Day int + Downloads int + Month time.Month + Year int + func (d DownloadAndDate) Date() YearMonthDay + type DownloadData struct + Dimension string + Serie []NameValuePair + type DownloadMonthly struct + Downloads int + Month time.Month + Year int + func (d DownloadMonthly) Date() YearMonth + type DownloadResponse struct + Data DownloadData + Dimension1 string + Filters []Filter + Measure string + type Filter struct + Name string + Value string + type GroupedCustomers struct + Customers Customers + Name string + type GroupedSales struct + Name string + Sales Sales + TotalUSD Amount + type NameValuePair struct + Name string + Value int + type NumberedGroup struct + Name string + Value int + type PluginInfo struct + Approved bool + ContactEmail string + Copyright string + CustomIdeList bool + Description string + Downloads int + HasUnapprovedUpdate bool + ID int + IconMarketplacePath string + Link string + Name string + PreviewText string + PurchaseInfo PurchaseInfo + ReadyForSale bool + RemovalRequested bool + Tags []Tag + URLs map[string]string + XmlID string + type PurchaseInfo struct + ProductCode string + type Sale struct + Amount Amount + AmountUSD Amount + Currency Currency + Customer Customer + Date YearMonthDay + Period Subscription + ReferenceID string + func NewSale(refID string, year, month, day int, subscription Subscription, ...) Sale + func (s Sale) ExchangeRate() float32 + func (s Sale) FeeAmount() Amount + func (s Sale) FeeAmountUSD() Amount + func (s Sale) IsFreeSubscription() bool + func (s Sale) String() string + type Sales []Sale + func (s Sales) After(date time.Time) Sales + func (s Sales) AtOrAfter(date time.Time) Sales + func (s Sales) Before(date time.Time) Sales + func (s Sales) ByAccountType(subscription AccountType) Sales + func (s Sales) ByAnnualSubscription() Sales + func (s Sales) ByCustomer(c Customer) Sales + func (s Sales) ByDateRange(begin, end YearMonthDay) Sales + func (s Sales) ByDay(date time.Time) Sales + func (s Sales) ByFreeSubscription() Sales + func (s Sales) ByMonth(year int, month time.Month) Sales + func (s Sales) ByMonthlySubscription() Sales + func (s Sales) ByNewCustomers(allPreviousSales Sales, referenceDate time.Time) Sales + func (s Sales) ByWeek(year int, isoWeek int) Sales + func (s Sales) ByYear(year int) Sales + func (s Sales) ByYearMonth(month YearMonth) Sales + func (s Sales) ByYearMonthDay(day YearMonthDay) Sales + func (s Sales) CountrySales() []*CountrySales + func (s Sales) CustomerCount() int + func (s Sales) CustomerSales() []*CustomerSales + func (s Sales) CustomerSalesMap() CustomerSalesMap + func (s Sales) CustomerTypeSales() []GroupedSales + func (s Sales) Customers() Customers + func (s Sales) CustomersFirstPurchase() CustomerDateMap + func (s Sales) CustomersLastPurchase() CustomerDateMap + func (s Sales) CustomersMap() CustomersMap + func (s Sales) FeeSumUSD() Amount + func (s Sales) FilterBy(keep func(Sale) bool) Sales + func (s Sales) GroupByCurrency() []*CurrencySales + func (s Sales) GroupByDate(newestDateFirst bool) []DateGroupedSales + func (s Sales) GroupByWeekday() []GroupedSales + func (s Sales) PaidOutUSD() Amount + func (s Sales) Reversed() Sales + func (s Sales) SortedByDate() Sales + func (s Sales) SubscriptionSales() []GroupedSales + func (s Sales) TotalSumUSD() Amount + type ScreenshotInfo struct + ID int + MarketplacePath string + type Subscription string + func (s Subscription) Abbrev() string + type Tag struct + ID int + MarketplacePath string + Name string + Privileged bool + Searchable bool + type Vendor struct + City string + Country string + CountryCode string + Email string + ID int + MarketplacePath string + Name string + PublicName string + ServicesDescription []string + TotalPlugins int + TotalUsers int + URL string + Verified bool + ZipCode string + type YearMonth [2]int + func NewYearMonth(year int, month time.Month) YearMonth + func NewYearMonthByDate(date time.Time) YearMonth + func (y YearMonth) Add(years, months, days int) YearMonth + func (y YearMonth) AsDate() time.Time + func (y YearMonth) ContainsDate(date time.Time) bool + func (y YearMonth) Equals(o YearMonth) bool + func (y YearMonth) IsAfter(o YearMonth) bool + func (y YearMonth) Month() time.Month + func (y YearMonth) NextMonth() YearMonth + func (y YearMonth) PreviousMonth() YearMonth + func (y YearMonth) String() string + func (y YearMonth) Year() int + type YearMonthDay [3]int + func NewYearMonthDay(year, month, day int) YearMonthDay + func NewYearMonthDayByDate(date time.Time) YearMonthDay + func (d YearMonthDay) Add(years, months, days int) YearMonthDay + func (d YearMonthDay) AddDays(days int) YearMonthDay + func (d YearMonthDay) AsDate() time.Time + func (d YearMonthDay) AsYearMonth() YearMonth + func (d YearMonthDay) Day() int + func (d YearMonthDay) Equals(o YearMonthDay) bool + func (d YearMonthDay) IsAfter(o YearMonthDay) bool + func (d YearMonthDay) IsBefore(o YearMonthDay) bool + func (d YearMonthDay) Month() time.Month + func (d YearMonthDay) NextDay() YearMonthDay + func (d YearMonthDay) String() string + func (d YearMonthDay) Year() int v0.4.0 Feb 4, 2021 v0.3.0 Oct 24, 2020 v0.2.0 Oct 15, 2020 v0.1.0 Oct 15, 2020