Skip to content

Commit bc32669

Browse files
committed
Fix code blocks in common guides.
1 parent 3a8e32a commit bc32669

19 files changed

+3376
-3175
lines changed

.rvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rvm use 2.2.0

_app/main.js

+8-16
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,8 @@ App.Views = {};
654654
if (this.platform === "ios" || this.platform === "osx" || this.platform === "macos") {
655655
new App.Views.Docs.Toggle({
656656
parent: this.scrollContent,
657-
opt1: 'objectivec', // was objc
658-
opt2: 'swift', // was swift
657+
opt1: 'objectivec',
658+
opt2: 'swift',
659659
label1: 'Objective-C',
660660
label2: 'Swift',
661661
onChange: this.handleToggleChange.bind(this)
@@ -700,23 +700,16 @@ App.Views = {};
700700
$('.common-lang-block').hide();
701701
switch (this.platform) {
702702
case 'ios':
703-
$('.common-lang-block.objc').show();
704-
$('.common-lang-block.swift').show();
705-
break;
706-
case 'osx':
707-
$('.common-lang-block.objc').show();
703+
case 'osx':
704+
case 'macos':
705+
$('.common-lang-block.objectivec').show();
708706
$('.common-lang-block.swift').show();
709707
break;
710708
case 'android':
711709
$('.common-lang-block.java').show();
712710
break;
713-
case 'js':
714-
$('.common-lang-block.js').show();
715-
break;
716711
case 'dotnet':
717-
$('.common-lang-block.csharp').show();
718-
break;
719-
case 'unity':
712+
case 'unity':
720713
$('.common-lang-block.csharp').show();
721714
break;
722715
case 'php':
@@ -726,12 +719,11 @@ App.Views = {};
726719
$('.common-lang-block.bash').show();
727720
$('.common-lang-block.python').show();
728721
break;
729-
case 'cloudcode':
730-
$('.common-lang-block.js').show();
731-
break;
732722
case 'arduino':
733723
$('.common-lang-block.cpp').show();
734724
break;
725+
case 'cloudcode':
726+
case 'js':
735727
default:
736728
$('.common-lang-block.js').show();
737729
}

_includes/android/getting-started.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
# Getting Started
22

3-
If you haven't installed the SDK yet, please [head over to the QuickStart guide]({{ page.quickstart }}#parse_data/mobile/android/native/new) to get our SDK up and running in Android Studio. Note that we support Android 2.3 and higher. You can also check out our [API Reference](https://parse.com/docs/android/api/) for more detailed information about our SDK.
4-
5-
The Parse platform provides a complete backend solution for your mobile application. Our goal is to totally eliminate the need for writing server code or maintaining servers. If you're familiar with web frameworks like Ruby on Rails, we've taken many of the same principles and applied them to our platform. In particular, our SDK is ready to use out of the box with minimal configuration on your part.
6-
7-
On Parse, you create an App for each of your mobile applications. Each App has its own application id and client key that you apply to your SDK install. Your account on Parse can accommodate multiple Apps. This is useful even if you have one application, since you can deploy different versions for test and production.
3+
If you haven't installed the SDK yet, please [head over to the QuickStart guide]({{ page.quickstart }}#parse_data/mobile/android/native/new) to get our SDK up and running in Android Studio. Note that we support Android 2.3 and higher. You can also check out our [API Reference](/Parse-SDK-Android/api/) for more detailed information about our SDK.

_includes/arduino/getting-started.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ The Parse platform provides a complete backend solution for your hardware device
66

77
Note that the Arduino SDK only contains a subset of Parse features found in mobile and desktop. This allows the SDK to be smaller in size and more performant, making it suitable for constrained embedded environments. The Arduino SDK is fully open source, and anyone can contribute to make it better, or make their own changes if necessary. Check out the[ GitHub repository](https://github.com/ParsePlatform/parse-embedded-sdks) for more information.
88

9-
On Parse, you create an App for each of your mobile and embedded applications. Each App has its own application id and client key that you apply to your SDK install. Your account on Parse can accommodate multiple Apps. This is useful even if you have one application, since you can deploy different versions for test and production.
10-
119
## Initialization
1210

13-
In order for Parse to know which app is associated with the Arduino device, simply specify the application ID and client key in your`setup` function:
11+
In order for Parse to know which app is associated with the Arduino device, simply specify the application ID and client key in your `setup` function:
1412

1513
```cpp
1614
void setup() {
@@ -19,4 +17,4 @@ void setup() {
1917
}
2018
```
2119

22-
After this, all calls to the Parse cloud will use the specified app.
20+
After this, all calls to the Parse Server will use the specified app.

_includes/common/data.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You may import data into your Parse app by using CSV or JSON files. To create a
3636

3737
The JSON format is an array of objects in our REST format or a JSON object with a `results` that contains an array of objects. It must adhere to the [JSON standard](http://json.org/). A file containing regular objects could look like:
3838

39-
<pre><code class="javascript">
39+
```js
4040
{ "results": [
4141
{
4242
"score": 1337,
@@ -47,7 +47,7 @@ The JSON format is an array of objects in our REST format or a JSON object with
4747
"objectId": "fchpZwSuGG"
4848
}]
4949
}
50-
</code></pre>
50+
```
5151

5252
Objects in either format should contain keys and values that also satisfy the following:
5353

@@ -63,7 +63,7 @@ In addition to the exposed fields, objects in the Parse User class can also have
6363

6464
A file containing a `User` object could look like:
6565

66-
<pre><code class="javascript">
66+
```js
6767
{ "results":
6868
[{
6969
"username": "cooldude",
@@ -74,7 +74,7 @@ A file containing a `User` object could look like:
7474
"bcryptPassword": "$2a$10$ICV5UeEf3lICfnE9W9pN9.O9Ved/ozNo7G83Qbdk5rmyvY8l16MIK"
7575
}]
7676
}
77-
</code></pre>
77+
```
7878

7979
Note that in CSV the import field types are limited to `String`, `Boolean`, and `Number`.
8080

_includes/common/performance.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
5050
```
5151
{: .common-lang-block .objc }
5252
53-
```swift
53+
<pre><code class="swift">
5454
let query = PFQuery.queryWithClassName("GameScore")
5555
query.whereKey("score", equalTo: 50)
5656
query.whereKey("playerName", containedIn: ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"])
@@ -96,7 +96,7 @@ query.equalTo("cheatMode", false);
9696
```
9797
{: .common-lang-block .objc }
9898
99-
```swift
99+
<pre><code class="swift">
100100
query.whereKey("cheatMode", equalTo: false)
101101
```
102102
{: .common-lang-block .swift }
@@ -172,7 +172,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
172172
```
173173
{: .common-lang-block .objc }
174174
175-
```swift
175+
<pre><code class="swift">
176176
let query = PFQuery.queryWithClassName("GameScore")
177177
query.whereKey("playerName", notEqualTo: "Michael Yabuti")
178178
query.findObjectsInBackgroundWithBlock {
@@ -233,7 +233,7 @@ PFQuery *query = [PFUser query];
233233
```
234234
{: .common-lang-block .objc }
235235
236-
```swift
236+
<pre><code class="swift">
237237
var query = PFUser.query()
238238
query.whereKey("state", notEqualTo: "Invited")
239239
```
@@ -274,7 +274,7 @@ query.containedIn("state", ["SignedUp", "Verified"]);
274274
```
275275
{: .common-lang-block .objc }
276276
277-
```swift
277+
<pre><code class="swift">
278278
query.whereKey("state", containedIn: ["SignedUp", "Verified"])
279279
```
280280
{: .common-lang-block .swift }
@@ -324,7 +324,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
324324
```
325325
{: .common-lang-block .objc }
326326
327-
```swift
327+
<pre><code class="swift">
328328
let query = PFQuery.queryWithClassName("GameScore")
329329
// Previously retrieved highScore for Michael Yabuti
330330
query.whereKey("score", greaterThan: highScore)
@@ -388,7 +388,7 @@ PFQuery *query = [PFUser query];
388388
```
389389
{: .common-lang-block .objc }
390390
391-
```swift
391+
<pre><code class="swift">
392392
var query = PFUser.query()
393393
query.whereKey("state", notContainedIn: ["Invited", "Blocked"])
394394
```
@@ -428,7 +428,7 @@ query.containedIn("state", ["SignedUp", "Verified"]);
428428
```
429429
{: .common-lang-block .objc }
430430

431-
```swift
431+
<pre><code class="swift">
432432
query.whereKey("state", containedIn: ["SignedUp", "Verified"])
433433
```
434434
{: .common-lang-block .swift }
@@ -471,7 +471,7 @@ query.matches("playerName", "Michael", “i”);
471471
```
472472
{: .common-lang-block .objc }
473473
474-
```swift
474+
<pre><code class="swift">
475475
query.whereKey("playerName", matchesRegex: "Michael", modifiers: "i")
476476
```
477477
{: .common-lang-block .swift }
@@ -508,7 +508,7 @@ query.contains("playerName", "Michael");
508508
```
509509
{: .common-lang-block .objc }
510510

511-
```swift
511+
<pre><code class="swift">
512512
query.whereKey("playerName", containsString: "Michael")
513513
```
514514
{: .common-lang-block .swift }
@@ -545,7 +545,7 @@ query.startsWith("playerName", "Michael");
545545
```
546546
{: .common-lang-block .objc }
547547
548-
```swift
548+
<pre><code class="swift">
549549
query.whereKey("playerName", hasPrefix: "Michael")
550550
```
551551
{: .common-lang-block .swift }
@@ -584,7 +584,7 @@ query.matches("playerName", "^Michael");
584584
```
585585
{: .common-lang-block .objc }
586586
587-
```swift
587+
<pre><code class="swift">
588588
query.whereKey("playerName", matchesRegex: "^Michael")
589589
```
590590
{: .common-lang-block .swift }
@@ -627,7 +627,7 @@ query.limit = 10; // limit to at most 10 results
627627
```
628628
{: .common-lang-block .objc }
629629
630-
```swift
630+
<pre><code class="swift">
631631
query.limit = 10 // limit to at most 10 results
632632
```
633633
{: .common-lang-block .swift }
@@ -674,7 +674,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"Place"];
674674
```
675675
{: .common-lang-block .objc }
676676

677-
```swift
677+
<pre><code class="swift">
678678
let query = PFQuery.queryWithClassName("Place")
679679
query.whereKey("location", nearGeoPoint: userGeoPoint, withinMiles: 10.0)
680680
query.findObjectsInBackgroundWithBlock {
@@ -740,7 +740,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
740740
```
741741
{: .common-lang-block .objc }
742742
743-
```swift
743+
<pre><code class="swift">
744744
let query = PFQuery.queryWithClassName("GameScore")
745745
query.selectKeys(["score", "playerName"])
746746
query.findObjectsInBackgroundWithBlock {
@@ -835,7 +835,7 @@ Parse.Cloud.run("averageStars", { "movie": "The Matrix" }).then(function(ratings
835835
```
836836
{: .common-lang-block .objc }
837837
838-
```swift
838+
<pre><code class="swift">
839839
PFCloud.callFunctionInBackground("averageStars", withParameters: ["movie": "The Matrix"]) {
840840
(ratings, error) in
841841
if !error {
@@ -913,7 +913,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"Review"];
913913
```
914914
{: .common-lang-block .objc }
915915
916-
```swift
916+
<pre><code class="swift">
917917
let query = PFQuery.queryWithClassName("Review")
918918
// movieId corresponds to a given movie's id
919919
query.whereKey("movie", equalTo: movieId)
@@ -1001,7 +1001,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"Movie"];
10011001
```
10021002
{: .common-lang-block .objc }
10031003
1004-
```swift
1004+
<pre><code class="swift">
10051005
let query = PFQuery.queryWithClassName("Movie")
10061006
query.findObjectsInBackgroundWithBlock {
10071007
(objects, error) in
@@ -1098,7 +1098,7 @@ PFQuery *query = [PFQuery queryWithClassName:@"Post"];
10981098
```
10991099
{: .common-lang-block .objc }
11001100

1101-
```swift
1101+
<pre><code class="swift">
11021102
let query = PFQuery.queryWithClassName("Post")
11031103
query.whereKey("hashtags", containsAllObjectsInArray: ["#parse", "#ftw"])
11041104
query.findObjectsInBackgroundWithBlock {

0 commit comments

Comments
 (0)