Skip to content
Closed
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions content/tutorials/history.textile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ blang[java].
}
```

In the above example a specific version of the library is referenced, however we recommend you check which is the latest stable version and always use that. Follow link to get the latest stable release for "Java":https://bintray.com/ably-io/ably/ably-java.

After you add necessary dependencies, you can import AblyRest class into your code and initialize it.

```[java]
Expand All @@ -74,7 +76,7 @@ blang[java].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/b271032
"See this step in Github":https://github.com/ably/tutorials/commit/56b96fe

blang[android].
To build your own Android Project, please visit "Android Developers":https://developer.android.com/training/basics/firstapp/creating-project.html website and get familiar with steps necessary to set up your own application.
Expand All @@ -89,6 +91,8 @@ blang[android].
}
```

In the above example a specific version of the library is referenced, however we recommend you check which is the latest stable version and always use that. Follow link to get the latest stable release for "Android":https://bintray.com/ably-io/ably/ably-android.

After you add necessary dependencies, you can import AblyRealtime class into your code and initialize it.

```[java]
Expand All @@ -114,7 +118,7 @@ blang[android].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/2165b22
"See this step in Github":https://github.com/ably/tutorials/commit/b354fd2

blang[javascript].
To start using Ably in your web app, you first need to include the Ably library. We recommend that you include the latest client library from our CDN using a simple @<script>@ tag. The client library must be instanced with the API key you copied in Step 1. Note in production we recommend you always use the "token authentication scheme":/general/authentication#token-authentication for browser clients, however in this example we use an API key for simplicity.
Expand Down Expand Up @@ -261,7 +265,7 @@ blang[java].
channel.publish("play", "cluck");
```

"See this step in Github":https://github.com/ably/tutorials/commit/8f620b2
"See this step in Github":https://github.com/ably/tutorials/commit/cb014ca

blang[android].
```[java]
Expand All @@ -283,7 +287,7 @@ blang[android].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/8f57b35
"See this step in Github":https://github.com/ably/tutorials/commit/22c4618

blang[javascript].
```[javascript]
Expand Down Expand Up @@ -360,7 +364,7 @@ blang[java].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/24f79be
"See this step in Github":https://github.com/ably/tutorials/commit/72c9b95

blang[android].
```[java]
Expand All @@ -373,7 +377,7 @@ blang[android].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/3a20150
"See this step in Github":https://github.com/ably/tutorials/commit/1eb8b1d

blang[javascript].
```[javascript]
Expand Down
16 changes: 10 additions & 6 deletions content/tutorials/publish-subscribe.textile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ blang[java].
}
```

In the above example a specific version of the library is referenced, however we recommend you check which is the latest stable version and always use that. Follow link to get the latest stable release for "Java":https://bintray.com/ably-io/ably/ably-java.

After you add necessary dependencies, you can import AblyRealtime class into your code and initialize it.

```[java]
Expand All @@ -57,7 +59,7 @@ blang[java].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/21cbacb
"See this step in Github":https://github.com/ably/tutorials/commit/044c23f


blang[android].
Expand All @@ -73,6 +75,8 @@ blang[android].
}
```

In the above example a specific version of the library is referenced, however we recommend you check which is the latest stable version and always use that. Follow link to get the latest stable release for "Android":https://bintray.com/ably-io/ably/ably-android.

After you add necessary dependencies, you can import AblyRest class into your code and initialize it.

```[java]
Expand All @@ -98,7 +102,7 @@ blang[android].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/089d9fd
"See this step in Github":https://github.com/ably/tutorials/commit/f390749

blang[javascript].
To start using Ably in your web app, you first need to include the Ably library. We recommend that you include the latest client library from our CDN using a simple @<script>@ tag. The client library must be instanced with the API key you copied in Step 1. Note in production we recommend you always use the "token authentication scheme":/general/authentication#token-authentication for browser clients, however in this example we use an API key for simplicity.
Expand Down Expand Up @@ -351,7 +355,7 @@ blang[java].
});
```

"See this step in Github":https://github.com/ably/tutorials/commit/519d498
"See this step in Github":https://github.com/ably/tutorials/commit/a0c24c5

blang[android].
```[java]
Expand All @@ -365,7 +369,7 @@ blang[android].
});
```

"See this step in Github":https://github.com/ably/tutorials/commit/0819d8a
"See this step in Github":https://github.com/ably/tutorials/commit/48132b8

blang[javascript].
```[javascript]
Expand Down Expand Up @@ -467,7 +471,7 @@ blang[java].
});
```

"See this step in Github":https://github.com/ably/tutorials/commit/098e674
"See this step in Github":https://github.com/ably/tutorials/commit/71f8444

blang[android].
```[java]
Expand All @@ -487,7 +491,7 @@ blang[android].
});
```

"See this step in Github":https://github.com/ably/tutorials/commit/110bd69
"See this step in Github":https://github.com/ably/tutorials/commit/aaf5888

blang[javascript].
```[javascript]
Expand Down
24 changes: 14 additions & 10 deletions content/tutorials/token-authentication.textile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ blang[java].
```[groovy]
repositories {
jcenter()
maven { url "https://raw.github.com/paddybyers/Java-WebSocket/mvn-repo/" }
}

dependencies {
compile 'io.ably:ably-java:0.8.4'
compile 'io.ably:ably-java:0.8.7'
}
```

In the above example a specific version of the library is referenced, however we recommend you check which is the latest stable version and always use that. Follow link to get the latest stable release for "Java":https://bintray.com/ably-io/ably/ably-java.

The server client library must be instanced with the private API key you copied in Step 1. This will ensure that the "basic authentication scheme":/general/authentication#basic-authentication is used, which is almost always the right choice for your own trusted servers where risk of compromise of your API key credentials is low.

Add the following to a file named @Example.java@ to instance the Ably library inside your Node.js server:
Expand All @@ -52,7 +53,7 @@ blang[java].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/2a4119f
"See this step in Github":https://github.com/ably/tutorials/commit/5a72529

blang[nodejs,android].
To start using Ably on your Node.js server, you first need to install the NPM module. The NPM module can be installed as follows:
Expand Down Expand Up @@ -248,7 +249,7 @@ blang[java].

Once running, open your browser to "http://localhost:3000/":http://localhost:3000/ and you should see the text "Hello, I am a very simple server".

"See this step in Github":https://github.com/ably/tutorials/commit/b75d500
"See this step in Github":https://github.com/ably/tutorials/commit/6d7ce69

blang[nodejs,android].
"Express.js":https://expressjs.com/ is a very popular and simple web framework for Node.js. Let's get this setup:
Expand Down Expand Up @@ -442,7 +443,7 @@ blang[java].
}
```

"See this step in Github":https://github.com/ably/tutorials/commit/2d2f86f
"See this step in Github":https://github.com/ably/tutorials/commit/4828df8

blang[nodejs,android].
By adding the following route to your Express.js server, it is now ready to service clients wanting to authenticate with Ably.
Expand Down Expand Up @@ -606,9 +607,12 @@ blang[android].
...
dependencies {
...
compile 'io.ably:ably-java:0.8.+'
compile 'io.ably:ably-android:0.8.7'
}
```

In the above example a specific version of the library is referenced, however we recommend you check which is the latest stable version and always use that. Follow link to get the latest stable release for "Android":https://bintray.com/ably-io/ably/ably-android.

After you add necessary dependencies, you can import AblyRealtime class into your @ExampleActivity@ and initialize it.

```[java]
Expand Down Expand Up @@ -775,10 +779,10 @@ blang[android].
So let's see what happens now. Restart the local server and rerun your application. You should receive an alert to confirm that you're connected to Ably which means your server has successfully issued a token request to the client, the client has then obtained a token from Ably with the token request, it has subsequently authenticated and finally connected.

blang[android].
"See this step in Github":http://github.com/ably/tutorials/commit/f37b17c
"See this step in Github":http://github.com/ably/tutorials/commit/ae636ad

blang[java].
"See this step in Github":https://github.com/ably/tutorials/commit/ebcf93e
"See this step in Github":https://github.com/ably/tutorials/commit/c2f1ab3

blang[nodejs].
"See this step in Github":https://github.com/ably/tutorials/commit/f63b65e
Expand Down Expand Up @@ -1654,10 +1658,10 @@ blang[android].
</a>

blang[android].
"See this step in Github":https://github.com/ably/tutorials/commit/42f253a
"See this step in Github":https://github.com/ably/tutorials/commit/bcce690

blang[java].
"See this step in Github":https://github.com/ably/tutorials/commit/91449ca
"See this step in Github":https://github.com/ably/tutorials/commit/3bd80eb

blang[nodejs].
"See this step in Github":https://github.com/ably/tutorials/commit/4acb241
Expand Down