You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+46-21Lines changed: 46 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,65 +91,90 @@ If you have not already download npm:
91
91
92
92
### Installation
93
93
94
-
1. Install the latest version
94
+
1. Install the latest version of the package
95
95
```sh
96
96
$ npm install replapi-it
97
97
```
98
-
2. Require the package
98
+
2. Require the package in your code
99
99
```js
100
100
constrepl=require('replapi-it');
101
101
```
102
102
103
103
## Usage
104
104
105
-
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
105
+
Using ReplAPI.it is very simple! Let's create a simple user and ask for their cycles:
106
+
```js
107
+
constrepl=require('replapi-it');
108
+
109
+
constmyUser=newrepl.User("RayhanADev");
110
+
111
+
asyncfunctiongetCycles() {
112
+
let info =awaitmyUser.profileData();
113
+
let cycles =info.cycles;
114
+
console.log(`User Cycles: ${cycles}`)
115
+
}
116
+
117
+
getCycles()
118
+
```
119
+
120
+
Output:
121
+
```sh
122
+
User Cycles: 1008
123
+
```
124
+
125
+
126
+
That was fun! Now how about getting a specific post? Let's create a simple post and ask for it's body:
127
+
```js
128
+
constrepl=require('replapi-it');
129
+
130
+
constmyPost=newrepl.Post(78043);
131
+
132
+
asyncfunctiongetTitle() {
133
+
let info =awaitmyPost.postData();
134
+
let title =info.title;
135
+
console.log(`Post Title: ${title}`)
136
+
}
137
+
138
+
getTitle()
139
+
```
140
+
Output:
141
+
```sh
142
+
Post Title: Presenting... 🤔 RayhanADev 🤔? (GraphQL Success!)
143
+
```
106
144
107
145
_For more examples, please refer to the [Documentation](https://replapidocs.rayhanadev.repl.co/)_
108
146
109
-
110
-
111
-
<!-- ROADMAP -->
112
147
## Roadmap
113
148
114
149
See the [open issues](https://github.com/RayhanADev/REPLAPI.it/issues) for a list of proposed features (and known issues).
115
150
151
+
I'm considering adding in support for Crosis communications after they distribute developer keys again. Right now I'm experimenting with WSS and eval.repl.it for code execution!
116
152
117
-
118
-
<!-- CONTRIBUTING -->
119
153
## Contributing
120
154
121
-
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
155
+
Contributions are **much appreciated**, and if you know another query that should be implemented on this package, follow these steps!
122
156
123
157
1. Fork the Project
124
158
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
125
159
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
126
160
4. Push to the Branch (`git push origin feature/AmazingFeature`)
127
161
5. Open a Pull Request
128
162
129
-
130
-
131
-
<!-- LICENSE -->
132
163
## License
133
164
134
165
Distributed under the GPL-3.0 License. See `LICENSE` for more information.
0 commit comments