Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #35 from ByteDream/v3/feature/common-api-endpoints
Browse files Browse the repository at this point in the history
Add more api endpoints
  • Loading branch information
bytedream authored May 30, 2022
2 parents 1c37c3e + 38fe521 commit 141173d
Show file tree
Hide file tree
Showing 8 changed files with 539 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<p align="center"><strong>Version 2 is out 🥳, see all the <a href="https://github.com/ByteDream/crunchyroll-go/releases/tag/v2.0.0">changes</a></strong>.</p>

# crunchyroll-go

A [Go](https://golang.org) library & cli for the undocumented [crunchyroll](https://www.crunchyroll.com) api. To use it, you need a crunchyroll premium account to for full (api) access.
Expand Down
29 changes: 29 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package crunchyroll

import "time"

// Account contains information about a crunchyroll account.
type Account struct {
AccountID string `json:"account_id"`
ExternalID string `json:"external_id"`
EmailVerified bool `json:"email_verified"`
Created time.Time `json:"created"`

Avatar string `json:"avatar"`
CrBetaOptIn bool `json:"cr_beta_opt_in"`
Email string `json:"email"`
MatureContentFlagManga string `json:"mature_content_flag_manga"`
MaturityRating string `json:"maturity_rating"`
OptOutAndroidInAppMarketing bool `json:"opt_out_android_in_app_marketing"`
OptOutFreeTrials bool `json:"opt_out_free_trials"`
OptOutNewMediaQueueUpdates bool `json:"opt_out_new_media_queue_updates"`
OptOutNewsletters bool `json:"opt_out_newsletters"`
OptOutPmUpdates bool `json:"opt_out_pm_updates"`
OptOutPromotionalUpdates bool `json:"opt_out_promotional_updates"`
OptOutQueueUpdates bool `json:"opt_out_queue_updates"`
OptOutStoreDeals bool `json:"opt_out_store_deals"`
PreferredCommunicationLanguage LOCALE `json:"preferred_communication_language"`
PreferredContentSubtitleLanguage LOCALE `json:"preferred_content_subtitle_language"`
QaUser bool `json:"qa_user"`
Username string `json:"username"`
}
43 changes: 43 additions & 0 deletions category.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package crunchyroll

// Category contains all information about a category.
type Category struct {
Category string `json:"tenant_category"`

SubCategories []struct {
Category string `json:"tenant_category"`
ParentCategory string `json:"parent_category"`

Localization struct {
Title string `json:"title"`
Description string `json:"description"`
Locale LOCALE `json:"locale"`
} `json:"localization"`

Slug string `json:"slug"`
} `json:"sub_categories"`

Images struct {
Background []struct {
Width int `json:"width"`
Height int `json:"height"`
Type string `json:"type"`
Source string `json:"source"`
} `json:"background"`

Low []struct {
Width int `json:"width"`
Height int `json:"height"`
Type string `json:"type"`
Source string `json:"source"`
} `json:"low"`
} `json:"images"`

Localization struct {
Title string `json:"title"`
Description string `json:"description"`
Locale LOCALE `json:"locale"`
} `json:"localization"`

Slug string `json:"slug"`
}
Loading

0 comments on commit 141173d

Please sign in to comment.