Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Commit

Permalink
Docs, close #10 close #15
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Nov 29, 2017
1 parent c8a0264 commit 5b94573
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 10 deletions.
8 changes: 7 additions & 1 deletion docs/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
> **`card_id`** - The ID of the current card.
**Returns:** int

> **`key`** - The key of the current card.
**Returns:** str

> **`elixir`** - The elixir cost of the card.
**Returns:** int

Expand All @@ -32,5 +35,8 @@
> **`description`** - The description of the card.
**Returns:** str

> **`decklink`** - The deck link for the card.
> **`deck_link`** - The deck link for the card.
**Returns:** str

> **`image_url`** - An image URL for the card, from cr-api assets.
**Returns:** str
17 changes: 15 additions & 2 deletions docs/clan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
?> Represents a clash royale clan.

#### Attributes

> **`tag`** - The tag of the clan.
**Returns:** str

> **`name`** - The name of the clan.
**Returns:** str

Expand Down Expand Up @@ -30,10 +34,19 @@
**Returns:** str

> **`clan_chest`** - The clan's clan chest data
**Returns:** ClanChest
**Returns:** [ClanChest](clanchest.md)

> **`members`** - The clan's members
**Returns:** list [[Member](member.md), [Member](member.md), [Member](member.md)... [Member](member.md)]

> **`badge_url`** - The clan's badge url
**Returns:** str
**Returns:** str

> **`raw_data`** - Raw dictionary data from the API
**Returns:** dict

> **`url`** - API Endpoint for the clan
**Returns:** str

> **`update`** - Update the current object
**Returns:** [Clan](clan.md)
15 changes: 12 additions & 3 deletions docs/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@
> **`chest_cycle`** - Information about the full length chest cycle.
**Returns:** list [Silver, Silver, Silver, Gold... Silver]

> **country_codes** - Information about the various countries in the game.
> **`country_codes`** - Information about the various countries in the game.
**Returns:** list [[Country](country.md), [Country](country.md), [Country](country.md)... [Country](country.md)]

> **rarities** - Detailed and technical information about each rarity in the game.
> **`rarities`** - Detailed and technical information about each rarity in the game.
**Returns:** list [[Rarity](rarity.md), [Rarity](rarity.md), [Rarity](rarity.md)... [Rarity](rarity.md)]

> **rarities** - Information about each card in the game.
> **`cards`** - Information about each card in the game.
**Returns:** dict {'knight': [CardInfo](cardinfo.md), 'archers': [CardInfo](cardinfo.md),... 'goblins': [CardInfo](cardinfo.md)]

> **`raw_data`** - Raw dictionary data from the API
**Returns:** dict

> **`url`** - API Endpoint for the profile
**Returns:** str

> **`update`** - Update the current object
**Returns:** [Profile](profile.md)

To get your next chest in cycle, look [here](https://grokkers.github.io/cr-async/#/profile?id=methods)!
26 changes: 22 additions & 4 deletions docs/profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

##### **`get_chest(index=0)`**
* Returns the `index`'th chest of the player.
If player's next chest is `Super Magical`, it returns `Super Magical` when you do `profile.get_clan(0)`
If player's next chest is `Super Magical`, it returns `Super Magical` when you do `profile.get_chest(0)`

* Return Type: str

Expand All @@ -25,7 +25,10 @@
> **`level`** - The current level the player is at.
**Returns:** int

> **`experience`** - A tuple of current xp and xp required to level up.
> **`xp`** - A tuple of current xp and xp required to level up. Alias of `experience`
**Returns:** tuple (int, int)

> **`experience`** - A tuple of current xp and xp required to level up. Alias of `xp`
**Returns:** tuple (int, int)

> **`name_changed`** - Indicates whether or not the player has changed names.
Expand Down Expand Up @@ -70,6 +73,9 @@
> **`draws`** - The amount of games drawn by the player.
**Returns:** int

> **`three_crown_wins`** - The amount of three crown wins obtained by the player.
**Returns:** int

> **`win_streak`** - The current win streak of the player.
**Returns:** int

Expand All @@ -79,7 +85,7 @@
> **`clan_tag`** - The tag of the clan the player is currently in
**Returns:** int or None

> **`clan_tag`** - The name of the clan the player is currently in
> **`clan_name`** - The name of the clan the player is currently in
**Returns:** str or None

> **`clan_role`** - The role of the player in his current clan
Expand All @@ -94,8 +100,20 @@
> **`deck`** - The player's deck
**Returns:** list [[Card](card.md), [Card](card.md), [Card](card.md), [Card](card.md), [Card](card.md), [Card](card.md), [Card](card.md), [Card](card.md)]

> **`deck_link`** - A deck link that can be used in the game.
**Returns:** str

> **`clan_badge_url`** - The profile's clan's badge url. Returns None if user is not in a clan.
**Returns:** str or None

> **`seasons`** - Player's previous seasons.
**Returns:** List [[Season](season.md), [Season](season.md), [Season](season.md)... [Season](season.md)] or None
**Returns:** List [[Season](season.md), [Season](season.md), [Season](season.md)... [Season](season.md)] or None

> **`raw_data`** - Raw dictionary data from the API
**Returns:** dict

> **`url`** - API Endpoint for the profile
**Returns:** str

> **`update`** - Update the current object
**Returns:** [Profile](profile.md)

0 comments on commit 5b94573

Please sign in to comment.