Skip to content

Commit a9176d5

Browse files
authored
docs: Remove outdated code examples (#9685)
1 parent b559fbf commit a9176d5

File tree

1 file changed

+3
-64
lines changed

1 file changed

+3
-64
lines changed

Diff for: README.md

+3-64
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who
4747
- [PostgreSQL](#postgresql)
4848
- [Locally](#locally)
4949
- [Docker Container](#docker-container)
50-
- [Saving an Object](#saving-an-object)
50+
- [Saving and Querying Objects](#saving-and-querying-objects)
5151
- [Connect an SDK](#connect-an-sdk)
5252
- [Running Parse Server elsewhere](#running-parse-server-elsewhere)
5353
- [Sample Application](#sample-application)
@@ -186,70 +186,9 @@ That's it! You are now running a standalone version of Parse Server on your mach
186186

187187
**Using a remote MongoDB?** Pass the `--databaseURI DATABASE_URI` parameter when starting `parse-server`. Learn more about configuring Parse Server [here](#configuration). For a full list of available options, run `parse-server --help`.
188188

189-
### Saving an Object
189+
### Saving and Querying Objects
190190

191-
Now that you're running Parse Server, it is time to save your first object. We'll use the [REST API](http://docs.parseplatform.org/rest/guide), but you can easily do the same using any of the [Parse SDKs](http://parseplatform.org/#sdks). Run the following:
192-
193-
```bash
194-
$ curl -X POST \
195-
-H "X-Parse-Application-Id: APPLICATION_ID" \
196-
-H "Content-Type: application/json" \
197-
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
198-
http://localhost:1337/parse/classes/GameScore
199-
```
200-
201-
You should get a response similar to this:
202-
203-
```js
204-
{
205-
"objectId": "2ntvSpRGIK",
206-
"createdAt": "2016-03-11T23:51:48.050Z"
207-
}
208-
```
209-
210-
You can now retrieve this object directly (make sure to replace `2ntvSpRGIK` with the actual `objectId` you received when the object was created):
211-
212-
```bash
213-
$ curl -X GET \
214-
-H "X-Parse-Application-Id: APPLICATION_ID" \
215-
http://localhost:1337/parse/classes/GameScore/2ntvSpRGIK
216-
```
217-
```json
218-
// Response
219-
{
220-
"objectId": "2ntvSpRGIK",
221-
"score": 1337,
222-
"playerName": "Sean Plott",
223-
"cheatMode": false,
224-
"updatedAt": "2016-03-11T23:51:48.050Z",
225-
"createdAt": "2016-03-11T23:51:48.050Z"
226-
}
227-
```
228-
229-
Keeping tracks of individual object ids is not ideal, however. In most cases you will want to run a query over the collection, like so:
230-
231-
```bash
232-
$ curl -X GET \
233-
-H "X-Parse-Application-Id: APPLICATION_ID" \
234-
http://localhost:1337/parse/classes/GameScore
235-
```
236-
```json
237-
// The response will provide all the matching objects within the `results` array:
238-
{
239-
"results": [
240-
{
241-
"objectId": "2ntvSpRGIK",
242-
"score": 1337,
243-
"playerName": "Sean Plott",
244-
"cheatMode": false,
245-
"updatedAt": "2016-03-11T23:51:48.050Z",
246-
"createdAt": "2016-03-11T23:51:48.050Z"
247-
}
248-
]
249-
}
250-
```
251-
252-
To learn more about using saving and querying objects on Parse Server, check out the [Parse documentation](http://docs.parseplatform.org).
191+
Now that you're running Parse Server, it is time to save your first object. The easiest way is to use the [REST API](http://docs.parseplatform.org/rest/guide), but you can easily do the same using any of the [Parse SDKs](http://parseplatform.org/#sdks). To learn more check out the [documentation](http://docs.parseplatform.org).
253192

254193
### Connect an SDK
255194

0 commit comments

Comments
 (0)