Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 35ec140

Browse files
committed
docs(README): styling
1 parent 9897b5e commit 35ec140

File tree

1 file changed

+33
-35
lines changed

1 file changed

+33
-35
lines changed

README.md

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
<p align="center"><img src="https://cldup.com/7umchwdUBh.png" /></p>
32

43
<h3 align="center">The official Strapi SDK for JavaScript, available for browsers or Node.js backends.</h3>
54

6-
***
5+
---
76

87
<p align="center">
98
<a href="https://travis-ci.org/strapi/strapi-sdk-javascript"><img src="https://img.shields.io/travis/strapi/strapi-sdk-javascript.svg?style=for-the-badge" /></a>
@@ -21,53 +20,52 @@ npm install strapi-sdk-javascript
2120

2221
## Start now
2322

24-
### Example
25-
2623
```js
27-
import Strapi from 'strapi-sdk-javascript'
24+
import Strapi from 'strapi-sdk-javascript';
25+
26+
const strapi = new Strapi('http://localhost:1337');
2827

29-
const strapi = new Strapi('http://localhost:1337')
3028
(async () => {
31-
const posts = await strapi.getEntries('post')
32-
console.log(posts.length)
33-
})()
29+
await strapi.login('username_or_email', 's3cr3t');
30+
const posts = await strapi.getEntries('post');
31+
console.log(`Posts count: ${posts.length}`);
32+
})();
3433
```
3534

36-
### API
37-
38-
- **Strapi(baseURL, [requestConfig](https://github.com/axios/axios#request-config))**
39-
- **register(username, email, password)**
40-
- **login(identifier, password)**
41-
- **forgotPassword(email, url)**
42-
- **resetPassword(code, password, passwordConfirmation)**
43-
- **setToken(token)**
44-
- **request(method, url, requestConfig)**
45-
- **getEntries(contentType, params)**
46-
- **getEntry(contentType, id)**
47-
- **createEntry(contentType, data)**
48-
- **updateEntry(contentType, id, data)**
49-
- **deleteEntry(contentType, id)**
50-
- **searchFiles(query)**
51-
- **getFiles(params)**
52-
- **getFile(id)**
53-
- **upload(data)**
35+
## API
36+
37+
### `Strapi(baseURL, [requestConfig](https://github.com/axios/axios#request-config))`
38+
### `register(username, email, password)`
39+
### `login(identifier, password)`
40+
### `forgotPassword(email, url)`
41+
### `resetPassword(code, password, passwordConfirmation)`
42+
### `setToken(token)`
43+
### `request(method, url, requestConfig)`
44+
### `getEntries(contentType, params)`
45+
### `getEntry(contentType, id)`
46+
### `createEntry(contentType, data)`
47+
### `updateEntry(contentType, id, data)`
48+
### `deleteEntry(contentType, id)`
49+
### `searchFiles(query)`
50+
### `getFiles(params)`
51+
### `getFile(id)`
52+
### `upload(data)`
5453

5554
## Resources
5655

57-
- [Documentation](https://strapi.github.io/strapi-sdk-javascript)
58-
- [Changelog](https://github.com/strapi/strapi-sdk-javascript/blob/master/CHANGELOG.md)
56+
* [Documentation](https://strapi.github.io/strapi-sdk-javascript)
57+
* [Changelog](https://github.com/strapi/strapi-sdk-javascript/blob/master/CHANGELOG.md)
5958

6059
## Roadmap
6160

62-
- GraphQL
63-
- Unit tests
64-
- Providers authentication helpers
65-
- Attach/Detach entry relationship
61+
* GraphQL
62+
* Providers authentication helpers
63+
* Attach/Detach entry relationship
6664

6765
## Credits
6866

69-
- [axios](https://github.com/axios/axios)
70-
- [typescript-starter](https://github.com/bitjson/typescript-starter)
67+
* [axios](https://github.com/axios/axios)
68+
* [typescript-starter](https://github.com/bitjson/typescript-starter)
7169

7270
## License
7371

0 commit comments

Comments
 (0)