Skip to content

Commit 1c24fc7

Browse files
committed
Fix formatting in README.md
1 parent 126773b commit 1c24fc7

File tree

1 file changed

+42
-15
lines changed

1 file changed

+42
-15
lines changed

README.md

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<img src="https://raw.githubusercontent.com/icepick4/onepyece/main/docs/onepyece_logo.png" width="200px"/>
66

7-
*Image generated with Midjourney.*
7+
_Image generated with Midjourney._
88

99
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/onepyece)
1010
![PyPI](https://img.shields.io/pypi/v/onepyece)
@@ -21,7 +21,7 @@
2121

2222
Python **API wrapper** for https://api-onepiece.com/ \
2323
Thank's to this package you can simply get informations about One Piece characters, fruits, crews, etc. The datas provided by the API are in french only for the moment. \
24-
Learn more about possibilities in the [Usage](#usage) section.
24+
Learn more about possibilities in the [Usage](#usage) section.
2525

2626
⚠️*This package is still in development and it's my very first python package, so it may not be stable.*
2727

@@ -33,37 +33,64 @@ Learn more about possibilities in the [Usage](#usage) section.
3333

3434
**There are several solutions :**
3535

36-
- Use this command ``pip install onepyece`` to get it from [PyPi](https://pypi.org/project/onepyece/)
37-
- Use this command ``pip install git+https://github.com/icepick4/onepyece`` to download it from this repo.
38-
- Download either the .zip or the tar.gz archive from the last release and then use this command `` pip install <path_to_archive> ``
36+
- Use this command `pip install onepyece` to get it from [PyPi](https://pypi.org/project/onepyece/)
37+
- Use this command `pip install git+https://github.com/icepick4/onepyece` to download it from this repo.
38+
- Download either the .zip or the tar.gz archive from the last release and then use this command `pip install <path_to_archive>`
3939

4040
## Usage
4141

4242
```py
4343
>>> import onepyece as op
44+
45+
4446
>>> sanji = op.character_by_name('sanji') # You can get a character by its name
45-
>>> sanji.birthday
46-
'2000-03-02'
47+
>>> sanji.size
48+
>>> '180cm'
49+
>>> sanji.crew['roman_name']
50+
>>> 'Mugiwara no Ichimi'
51+
4752
>>> nb_fruits = op.count_fruits() # You can get the count of a specific endpoint
4853
>>> nb_fruits.count
49-
197
54+
>>> 206
5055
>>> nb_fruits.url
51-
https://api.api-onepiece.com/fruits/count
56+
>>> 'https://api.api-onepiece.com/v2/fruits/en/count'
57+
5258
>>> crews = op.API('crews') # List of all the crews in dict form as you can see below
5359
>>> crews[0]
54-
API(object={'endpoint': None, 'search_term': None, 'resource': None, 'object': True, 'id': 1, 'french_name': 'L’équipage du Chapeau de Paille', 'roman_name': 'Mugiwara no Ichimi', 'description': '', 'total_prime': '3.161.000.100', 'number': '10', 'status': 'actif', 'isYonko': True, 'affiliation': ''})
60+
>>> API(object={'endpoint': None, 'search_term': None, 'resource': None, 'lang': 'en', 'url': None, 'id': 1, 'name': 'The Chapeau de Paille crew', 'description': None, 'status': 'assets', 'roman_name': 'Mugiwara no Ichimi', 'total_prime': '3.161.000.100', 'number': '10', 'is_yonko': True})
5561
>>> crews.count # You can implicitly get the count of an endpoint by getting the whole list of it.
56-
149
57-
>>>crews[1].french_name
58-
'L’équipage du Roux'
62+
>>> 149
63+
>>> crews[1].name
64+
>>> 'Le Roux crew'
65+
66+
# Make a search on a list already fetched
67+
>>> roger_crew = crews.search('name', 'roger')
68+
>>> roger_crew
69+
>>> Total crews found for this search: 1.
70+
>>> roger_crew[0]
71+
{
72+
"endpoint": null,
73+
"search_term": null,
74+
"resource": null,
75+
"lang": "en",
76+
"url": null,
77+
"id": 5,
78+
"name": "The Pirates Roger crew",
79+
"description": null,
80+
"status": "dissolved",
81+
"roman_name": "Rojā Kaizoku Dan",
82+
"total_prime": "5.564.800.000",
83+
"number": "30",
84+
"is_yonko": true
85+
}
5986
```
6087

61-
To learn more about the possibilities, you can check the
88+
To learn more about the possibilities, you can check the
6289
detailed **documentation** [here](docs/) and more examples [here](docs/examples.py).
6390

6491
## Tests
6592

66-
You can test the application by running ``python -m tests``
93+
You can test the application by running `python -m tests`
6794

6895
## Contributing
6996

0 commit comments

Comments
 (0)