Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a bunch of parse cloud references #654

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/android/handling-errors.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Handling Errors

Many of the methods on `ParseObject`, including `save()`, `delete()`, and `get()` will throw a `ParseException` on an invalid request, such as deleting or editing an object that no longer exists in the cloud, or when there is a network failure preventing communication with the Parse Cloud. You will need to catch and deal with these exceptions.
Many of the methods on `ParseObject`, including `save()`, `delete()`, and `get()` will throw a `ParseException` on an invalid request, such as deleting or editing an object that no longer exists in the database, or when there is a network failure preventing communication with your Parse Server. You will need to catch and deal with these exceptions.

For more details, look at the [Android API]({{ site.apis.android }}).
16 changes: 8 additions & 8 deletions _includes/android/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Each `ParseObject` has a class name that you can use to distinguish different so

## Saving Objects

Let's say you want to save the `GameScore` described above to the Parse Cloud. The interface is similar to a `Map`, plus the `saveInBackground` method:
Let's say you want to save the `GameScore` described above to your Parse Server. The interface is similar to a `Map`, plus the `saveInBackground` method:

```java
ParseObject gameScore = new ParseObject("GameScore");
Expand Down Expand Up @@ -169,7 +169,7 @@ query.getInBackground("xWMyZ4YEGZ", new GetCallback<ParseObject>() {
public void done(ParseObject gameScore, ParseException e) {
if (e == null) {
// Now let's update it with some new data. In this case, only cheatMode and score
// will get sent to the Parse Cloud. playerName hasn't changed.
// will get sent to your Parse Server. playerName hasn't changed.
gameScore.put("score", 1338);
gameScore.put("cheatMode", true);
gameScore.saveInBackground();
Expand Down Expand Up @@ -212,7 +212,7 @@ Note that it is not currently possible to atomically add and remove items from a

## Deleting Objects

To delete an object from the Parse Cloud:
To delete an object from your Parse Server:

```java
myObject.deleteInBackground();
Expand All @@ -226,7 +226,7 @@ You can delete a single field from an object with the `remove` method:
// After this, the playerName field will be empty
myObject.remove("playerName");

// Saves the field deletion to the Parse Cloud
// Saves the field deletion to your Parse Server
myObject.saveInBackground();
```

Expand Down Expand Up @@ -485,7 +485,7 @@ protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable("object", object);
}

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
if (savedInstanceState != null) {
Expand All @@ -507,7 +507,7 @@ This means that the `ParseObject` is internally notified about the operation res
When the Local Datastore is disabled, and the parceled `ParseObject` has ongoing operations that haven't finished yet, the unparceled object will end up in a stale state. The unparceled object, being a different instance than the source object,

- assumes that ongoing operations at the moment of parceling never took place
- will not update its internal state when the operations triggered by the source object
- will not update its internal state when the operations triggered by the source object

The unfortunate consequence is that keys that were dirty before saving will still be marked as dirty for the unparceled object. This means, for instance, that any future call to `saveInBackground()` will send these dirty operations to the server again. This can lead to inconsistencies for operations like `increment`, since it might be performed twice.

Expand All @@ -520,12 +520,12 @@ By default, `ParseObject` implementation parcels everything that is needed. If y
@ParseClassName("Armor")
public class Armor extends ParseObject {
private int member;

@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putInt("member", member);
}

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
member = savedInstanceState.getInt("member");
Expand Down
2 changes: 1 addition & 1 deletion _includes/android/push-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can also get the set of channels that the current device is subscribed to us
List<String> subscribedChannels = ParseInstallation.getCurrentInstallation().getList("channels");
```

Neither the subscribe method nor the unsubscribe method blocks the thread it is called from. The subscription information is cached on the device's disk if the network is inaccessible and transmitted to the Parse Cloud as soon as the network is usable. This means you don't have to worry about threading or callbacks while managing subscriptions.
Neither the subscribe method nor the unsubscribe method blocks the thread it is called from. The subscription information is cached on the device's disk if the network is inaccessible and transmitted to your Parse Server as soon as the network is usable. This means you don't have to worry about threading or callbacks while managing subscriptions.

#### Sending Pushes to Channels

Expand Down
2 changes: 1 addition & 1 deletion _includes/arduino/cloud-code.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cloud Functions

Cloud Functions allow you to run custom app logic in the Parse Cloud. This is especially useful for running complex app logic in the cloud so that you can reduce the memory footprint of your code on the IoT device. In a Cloud Function, you can query/save Parse data, send push notifications, and log analytics events.
Cloud Functions allow you to run custom app logic on your Parse Server. This is especially useful for running complex app logic in the cloud so that you can reduce the memory footprint of your code on the IoT device. In a Cloud Function, you can query/save Parse data, send push notifications, and log analytics events.

You write your Cloud Code in JavaScript using the Parse JavaScript SDK. We provide a command-line tool to help you deploy your Cloud Code. See our [Cloud Code guide]({{ site.baseUrl }}/cloudcode/guide) for details.

Expand Down
4 changes: 2 additions & 2 deletions _includes/arduino/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Each object has a class name that you can use to distinguish different sorts of

## Saving Objects

Let's say you want to save the `Temperature` described above to the Parse Cloud. You would do the following:
Let's say you want to save the `Temperature` described above to your Parse Server. You would do the following:

```cpp
ParseObjectCreate create;
Expand All @@ -41,7 +41,7 @@ After this code runs, you will probably be wondering if anything really happened

There are two things to note here. You didn't have to configure or set up a new Class called `Temperature` before running this code. Your Parse app lazily creates this Class for you when it first encounters it.

There are also a few fields you don't need to specify that are provided as a convenience. `objectId` is a unique identifier for each saved object. `createdAt` and`updatedAt` represent the time that each object was created and last modified in the Parse Cloud. Each of these fields is filled in by Parse, so they don't exist on a Parse Object until a save operation has completed.
There are also a few fields you don't need to specify that are provided as a convenience. `objectId` is a unique identifier for each saved object. `createdAt` and`updatedAt` represent the time that each object was created and last modified in your Parse Server. Each of these fields is filled in by Parse, so they don't exist on a Parse Object until a save operation has completed.

## Retrieving Objects

Expand Down
2 changes: 1 addition & 1 deletion _includes/common/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Objects in either format should contain keys and values that also satisfy the fo
* Key names must contain only numbers, letters, and underscore, and must start with a letter.
* No value may contain a hard newline '`\n`'.

Normally, when objects are saved to Parse, they are automatically assigned a unique identifier through the `objectId` field, as well as a `createdAt` field and `updatedAt` field which represent the time that the object was created and last modified in the Parse Cloud. These fields can be manually set when data is imported from a JSON file. Please keep in mind the following:
Normally, when objects are saved to Parse, they are automatically assigned a unique identifier through the `objectId` field, as well as a `createdAt` field and `updatedAt` field which represent the time that the object was created and last modified in your Parse Server. These fields can be manually set when data is imported from a JSON file. Please keep in mind the following:

* Use a unique 10 character alphanumeric string as the value of your `objectId` fields.
* Use a UTC timestamp in the ISO 8601 format when setting a value for the `createdAt` field or the `updatedAt` field.
Expand Down
12 changes: 6 additions & 6 deletions _includes/common/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Sessions represent an instance of a user logged into a device. Sessions are automatically created when users log in or sign up. They are automatically deleted when users log out. There is one distinct `Session` object for each user-installation pair; if a user issues a login request from a device they're already logged into, that user's previous `Session` object for that Installation is automatically deleted. `Session` objects are stored on Parse in the Session class, and you can view them on the Parse Dashboard Data Browser. We provide a set of APIs to manage `Session` objects in your app.

`Session` is a subclass of a Parse `Object`, so you can query, update, and delete sessions in the same way that you manipulate normal objects on Parse. Because the Parse Cloud automatically creates sessions when you log in or sign up users, you should not manually create `Session` objects unless you are building a "Parse for IoT" app (e.g. Arduino or Embedded C). Deleting a `Session` will log the user out of the device that is currently using this session's token.
`Session` is a subclass of a Parse `Object`, so you can query, update, and delete sessions in the same way that you manipulate normal objects on Parse. Because Parse Server automatically creates sessions when you log in or sign up users, you should not manually create `Session` objects unless you are building a "Parse for IoT" app (e.g. Arduino or Embedded C). Deleting a `Session` will log the user out of the device that is currently using this session's token.

Unlike other Parse objects, the `Session` class does not have Cloud Code triggers. So you cannot register a `beforeSave` or `afterSave` handler for the Session class.

Expand All @@ -17,14 +17,14 @@ The `Session` object has these special fields:
* `authProvider` could have values: `password`, `anonymous`, `facebook`, or `twitter`.
* `restricted` (readonly): Boolean for whether this session is restricted.
* Restricted sessions do not have write permissions on `User`, `Session`, and `Role` classes on Parse. Restricted sessions also cannot read unrestricted sessions.
* All sessions that the Parse Cloud automatically creates during user login/signup will be unrestricted. All sessions that the developer manually creates by saving a new `Session` object from the client (only needed for "Parse for IoT" apps) will be restricted.
* All sessions that Parse Server automatically creates during user login/signup will be unrestricted. All sessions that the developer manually creates by saving a new `Session` object from the client (only needed for "Parse for IoT" apps) will be restricted.
* `expiresAt` (readonly): Approximate UTC date when this `Session` object will be automatically deleted. You can configure session expiration settings (either 1-year inactivity expiration or no expiration) in your app's Parse Dashboard settings page.
* `installationId` (can be set only once): String referring to the `Installation` where the session is logged in from. For Parse SDKs, this field will be automatically set when users log in or sign up.
All special fields except `installationId` can only be set automatically by the Parse Cloud. You can add custom fields onto `Session` objects, but please keep in mind that any logged-in device (with session token) can read other sessions that belong to the same user (unless you disable Class-Level Permissions, see below).
All special fields except `installationId` can only be set automatically by Parse Server. You can add custom fields onto `Session` objects, but please keep in mind that any logged-in device (with session token) can read other sessions that belong to the same user (unless you disable Class-Level Permissions, see below).

## Handling Invalid Session Token Error

With revocable sessions, your current session token could become invalid if its corresponding `Session` object is deleted from the Parse Cloud. This could happen if you implement a Session Manager UI that lets users log out of other devices, or if you manually delete the session via Cloud Code, REST API, or Data Browser. Sessions could also be deleted due to automatic expiration (if configured in app settings). When a device's session token no longer corresponds to a `Session` object on the Parse Cloud, all API requests from that device will fail with “Error 209: invalid session token”.
With revocable sessions, your current session token could become invalid if its corresponding `Session` object is deleted from your Parse Server. This could happen if you implement a Session Manager UI that lets users log out of other devices, or if you manually delete the session via Cloud Code, REST API, or Data Browser. Sessions could also be deleted due to automatic expiration (if configured in app settings). When a device's session token no longer corresponds to a `Session` object on your Parse Server, all API requests from that device will fail with “Error 209: invalid session token”.

To handle this error, we recommend writing a global utility function that is called by all of your Parse request error callbacks. You can then handle the "invalid session token" error in this global function. You should prompt the user to login again so that they can obtain a new session token. This code could look like this:

Expand Down Expand Up @@ -292,7 +292,7 @@ try {

`Session` objects can only be accessed by the user specified in the user field. All `Session` objects have an ACL that is read and write by that user only. You cannot change this ACL. This means querying for sessions will only return objects that match the current logged-in user.

When you log in a user via a `User` login method, Parse will automatically create a new unrestricted `Session` object in the Parse Cloud. Same for signups and Facebook/Twitter logins.
When you log in a user via a `User` login method, Parse will automatically create a new unrestricted `Session` object in your Parse Server. Same for signups and Facebook/Twitter logins.

Session objects manually created from client SDKs (by creating an instance of `Session`, and saving it) are always restricted. You cannot manually create an unrestricted sessions using the object creation API.

Expand All @@ -310,7 +310,7 @@ Parse.Cloud.beforeSave("MyClass", function(request, response) {
});
});
```
You can configure Class-Level Permissions (CLPs) for the Session class just like other classes on Parse. CLPs restrict reading/writing of sessions via the `Session` API, but do not restrict Parse Cloud's automatic session creation/deletion when users log in, sign up, and log out. We recommend that you disable all CLPs not needed by your app. Here are some common use cases for Session CLPs:
You can configure Class-Level Permissions (CLPs) for the Session class just like other classes on Parse. CLPs restrict reading/writing of sessions via the `Session` API, but do not restrict Parse Server's automatic session creation/deletion when users log in, sign up, and log out. We recommend that you disable all CLPs not needed by your app. Here are some common use cases for Session CLPs:

* **Find**, **Delete** — Useful for building a UI screen that allows users to see their active session on all devices, and log out of sessions on other devices. If your app does not have this feature, you should disable these permissions.
* **Create** — Useful for "Parse for IoT" apps (e.g. Arduino or Embedded C) that provision restricted user sessions for other devices from the phone app. You should disable this permission when building apps for mobile and web. For "Parse for IoT" apps, you should check whether your IoT device actually needs to access user-specific data. If not, then your IoT device does not need a user session, and you should disable this permission.
Expand Down
4 changes: 2 additions & 2 deletions _includes/dotnet/handling-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ await user.SignUpAsync();

This will throw an `InvalidOperationException` because `SignUpAsync` was called without first setting the required properties (`Username` and `Password`).

The second type of error is one that occurs when interacting with the Parse Cloud over the network. These errors are either related to problems connecting to the cloud or problems performing the requested operation. Let's take a look at another example:
The second type of error is one that occurs when interacting with Parse Server over the network. These errors are either related to problems connecting to the cloud or problems performing the requested operation. Let's take a look at another example:

```cs
await ParseObject.GetQuery("Note").GetAsync("thisObjectIdDoesntExist");
```

In the above code, we try to fetch an object with a non-existent `ObjectId`. The Parse Cloud will return an error -- so here's how to handle it properly:
In the above code, we try to fetch an object with a non-existent `ObjectId`. Parse Server will return an error -- so here's how to handle it properly:

```cs
try
Expand Down
6 changes: 3 additions & 3 deletions _includes/dotnet/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Each `ParseObject` has a class name that you can use to distinguish different so

## Saving Objects

Let's say you want to save the `GameScore` described above to the Parse Cloud. The interface is similar to an `IDictionary<string, object>`, plus the `SaveAsync` method:
Let's say you want to save the `GameScore` described above to your Parse Server. The interface is similar to an `IDictionary<string, object>`, plus the `SaveAsync` method:

```cs
ParseObject gameScore = new ParseObject("GameScore");
Expand All @@ -35,7 +35,7 @@ createdAt:"2011-06-10T18:33:42Z", updatedAt:"2011-06-10T18:33:42Z"

There are two things to note here. You didn't have to configure or set up a new Class called `GameScore` before running this code. Your Parse app lazily creates this Class for you when it first encounters it.

There are also a few fields you don't need to specify that are provided as a convenience. `ObjectId` is a unique identifier for each saved object. `CreatedAt` and `UpdatedAt` represent the time that each object was created and last modified in the Parse Cloud. Each of these fields is filled in by Parse, so they don't exist on a `ParseObject` until a save operation has completed.
There are also a few fields you don't need to specify that are provided as a convenience. `ObjectId` is a unique identifier for each saved object. `CreatedAt` and `UpdatedAt` represent the time that each object was created and last modified in your Parse Server. Each of these fields is filled in by Parse, so they don't exist on a `ParseObject` until a save operation has completed.

## Data Types

Expand Down Expand Up @@ -178,7 +178,7 @@ You can delete a single field from an object with the `Remove` method:
// After this, the playerName field will be empty
myObject.Remove("playerName");

// Saves the field deletion to the Parse Cloud
// Saves the field deletion to Parse Server
await myObject.SaveAsync();
```

Expand Down
2 changes: 1 addition & 1 deletion _includes/embedded_c/cloud-code.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cloud Functions

Cloud Functions allow you to run custom app logic in the Parse Cloud. This is especially useful for running complex app logic in the cloud so that you can reduce the memory footprint of your code on the IoT device. In a Cloud Function, you can query/save Parse data, send push notifications, and log analytics events.
Cloud Functions allow you to run custom app logic on your Parse Server. This is especially useful for running complex app logic in the cloud so that you can reduce the memory footprint of your code on the IoT device. In a Cloud Function, you can query/save Parse data, send push notifications, and log analytics events.

You write your Cloud Code in JavaScript using the Parse JavaScript SDK. See our [Cloud Code guide]({{ site.baseUrl }}/cloudcode/guide/) for details.

Expand Down
Loading