Skip to content

Commit

Permalink
fixing formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Saikamesh committed Feb 16, 2024
1 parent ea38ccd commit 30be9e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions howToQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ How to structure a request body?
Below is the example of a request body.

```json

request_body = {
"query": {
"and": [
Expand All @@ -20,6 +21,7 @@ request_body = {
],
}
}

```

The request body is a query object which is used to get the information from the api.
Expand Down Expand Up @@ -90,6 +92,7 @@ Below is an example on how to write query object based on the requirements
Let’s say, you want to get data about videos which contain the hashtag #nfl from region US, And you do not want any videos which are less than 15s. Below is how you write the query for it

```json

request_body = {
"query": {
"and": [
Expand All @@ -102,13 +105,15 @@ request_body = {
],
}
}

```

We have left the `or` condition empty as there is no need for it.

consider for a moment that we need to get the data from either US or Japan, below is how we’d structure our query object,

```json

request_body = {
"query": {
"and": [
Expand All @@ -123,4 +128,5 @@ request_body = {
],
}
}

```

0 comments on commit 30be9e8

Please sign in to comment.