Skip to content

Commit

Permalink
Fix final typos
Browse files Browse the repository at this point in the history
  • Loading branch information
aMytho committed Jun 11, 2023
1 parent 3174ab8 commit 2068253
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
Expand Up @@ -52,7 +52,7 @@ Paste this in your file:
```JS
//When a user visits http://localhost:3000/auth
app.get('/auth', (req, res) => {
//redirects the user to the glimesh authenication page
//redirects the user to the glimesh authentication page
res.redirect(307, 'https://glimesh.tv/oauth/authorize?response_type=code&state=&client_id=' + clientID + '&scope=public%20email%20chat%20streamkey&redirect_uri=' + encodeURIComponent(redirectUri));
});
```
Expand Down Expand Up @@ -84,7 +84,7 @@ var clientID = "CLIENT_ID_HERE"
var secretID = "SECRET_HERE"
```

We need to create an endpoint for Glimesh to redirect to. In the previous section we told Glimesh to redirect to `locahhost:3000/success`. Let's create it!
We need to create an endpoint for Glimesh to redirect to. In the previous section we told Glimesh to redirect to `localhost:3000/success`. Let's create it!

``` JS
app.get("/success", (req, res) => {
Expand All @@ -102,7 +102,7 @@ Once you have the code you can request the token from Glimesh. This can be done
app.get("/success", (req, res) => {
let code = req.query.code;
console.log("The code is " + code);
res.send(`<h1>Code recieved, requesting token!</h1>`) //Sends a confirm message to the user
res.send(`<h1>Code received, requesting token!</h1>`) //Sends a confirm message to the user
//Now we send this code to Glimesh to ask for a token.
var options = {
method: 'POST',
Expand Down Expand Up @@ -137,7 +137,7 @@ Once that is complete and the server is running head to `http://localhost:3000/a

You should see a confirmation message in your browser. The server is now sending the code back to Glimesh to request a token. Check the console in your terminal to see the code!

![Imgur](https://i.imgur.com/67sv2eV.png)
![Glimesh Confirmation Message](https://i.imgur.com/67sv2eV.png)

You can use the *access_token* to query the API on the users behalf. This will expire in 24 hours so you will need to refresh the token or get a new one. If you have any question talk to us in the #dev-questions channel in our [Discord](https://glimesh.tv/s/discord). We would love to hear what you are making!

Expand All @@ -157,21 +157,21 @@ app.listen(port, () => console.log('App listening on port ' + port));

//When a user visits http://localhost:3000/auth
app.get('/auth', (req, res) => {
//redirects the user to the glimesh authenication page
//redirects the user to the Glimesh authentication page
res.redirect(307, 'https://glimesh.tv/oauth/authorize?response_type=code&state=&client_id=' + clientID + '&scope=public%20email%20chat%20streamkey&redirect_uri=' + encodeURIComponent(redirectUri));
});

app.get("/success", (req, res) => {
let code = req.query.code;
console.log("The code is " + code);
res.send(`<h1>Code Recieved!</h1>`) //Sends a confirm message to the user
res.send(`<h1>Code Received!</h1>`) //Sends a confirm message to the user
//Now we send this code to Glimesh to ask for a token.
var options = {
method: 'POST',
body: "",
url: "https://glimesh.tv/api/oauth/token?grant_type=authorization_code&code=" + code + "&redirect_uri=" + encodeURIComponent(redirectUri) + "&client_id=" + clientID + "&client_secret=" + secretID
};
request(options, (error, response, body) => { //Send glimesh the code for a token in return
request(options, (error, response, body) => { //Send Glimesh the code for a token in return
if (!error && response.statusCode == 200) { //If all is as it should be
console.log(body); //The unfiltered response
var data = JSON.parse(body); //The parsed response
Expand Down
2 changes: 1 addition & 1 deletion content/docs/DeveloperResources/Tools.md
@@ -1,4 +1,4 @@
# Community Libraries
# Community Tools

This is a list of tools to help develop apps with the API. None of these are required but they may help you during development.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/api/API Explorer.md
Expand Up @@ -57,7 +57,7 @@ The purple boxes are the variables from earlier. Press ctrl+space while in the t
Next we need to set our access token to the *access_token* variable in Insomnia. Open the environment tab from earlier. In the access token value after Bearer press ctrl+space. Select response => body-attribute. Click on the box that appeared in the value.

Request must be set to out Auth Request from eariler. Filter must be $.access_token . This pulls the token from the auth response. The trigger behavior must be set to "when expired". Max age is 21600 (the life of the token).
Request must be set to out Auth Request from earlier. Filter must be $.access_token . This pulls the token from the auth response. The trigger behavior must be set to "when expired". Max age is 21600 (the life of the token).
![token](https://i.imgur.com/Q4niJEK.png)

Select done. Close the variable window.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/api/Pagination.md
Expand Up @@ -275,7 +275,7 @@ This will return the 5 most recent users. Glimesh adds users in the order that t

> Note that you will get a different result. Users have been added since this doc was written, so you will get different users.
We can also request pageInfo with each paginated query. This will tell us if there is another page after or before our result, and show us the first and last cursor of our result. For our queries this wasn't neccassary, but if you plan to paginate through a large amount of users it is very helpful. The below query gets 5 users before the last 5 users with the **before** parameter.
We can also request pageInfo with each paginated query. This will tell us if there is another page after or before our result, and show us the first and last cursor of our result. For our queries this wasn't necessary, but if you plan to paginate through a large amount of users it is very helpful. The below query gets 5 users before the last 5 users with the **before** parameter.

{{< tabs "getBeforeLast" >}}
{{< tab "Request" >}}
Expand Down
2 changes: 1 addition & 1 deletion content/docs/api/Query api/NodeJS/Node Query.md
Expand Up @@ -158,7 +158,7 @@ var options = {
}
};

//Callback function runs when the data is recieved. We convert it to an object on arrival.
//Callback function runs when the data is received. We convert it to an object on arrival.
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body); //The unfiltered response
Expand Down
2 changes: 1 addition & 1 deletion content/docs/api/Voyager.md
Expand Up @@ -2,7 +2,7 @@
enableInlineShortcodes: true
bookToC: false
---
Voyager is an interactive GraphQL API explorer. It allows you to view all the data in our API. Click and drag to move around the explorer. Click on a field to view its properties. Scoll to adjust zoom.
Voyager is an interactive GraphQL API explorer. It allows you to view all the data in our API. Click and drag to move around the explorer. Click on a field to view its properties. Scroll to adjust zoom.

{{< rawhtml >}}
<div id="voyager">Loading...</div>
Expand Down
2 changes: 1 addition & 1 deletion content/docs/chat/Projects/TypescriptChatbot.md
Expand Up @@ -200,7 +200,7 @@ Replace your client ID and client secret as shown below. If you do not yet have

**.gitignore**

This may already be created. If so just add the lines to the bottom of the file. If not create the file. This prevents git from commiting our auth code and generated files.
This may already be created. If so just add the lines to the bottom of the file. If not create the file. This prevents git from committing our auth code and generated files.
```git
# Ignore our credentials
auth.json
Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/channelReference.md
Expand Up @@ -2,7 +2,7 @@
bookHidden: true
---

Shows all the properties of the channel object. Note that for nested objects only one propery is shown.
Shows all the properties of the channel object. Note that for nested objects only one property is shown.

```js
subscription {
Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/chatPartsReference.md
Expand Up @@ -2,7 +2,7 @@
bookHidden: true
---

All the possbile data to query from a chat part.
All the possible data to query from a chat part.

```js
subscription{
Expand Down

0 comments on commit 2068253

Please sign in to comment.