Browse Source

Merge branch 'docs' of vincent/ilfs-data into master

pull/6/head
janwey 1 year ago
parent
commit
eb496f37aa
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      docs/collector.md

+ 4
- 4
docs/collector.md View File

@@ -351,7 +351,7 @@ using wrong variables.
Additionally, we still need to split up the `twitter_timedate` variable, which
currently contains the point of time of the tweet in the form of
`YYYY-MM-DD HH:MM:SS`. For this, we again use regex and the function `sub()`.
As `sub()` only replanes the first instance of the pattern given to it, if we
As `sub()` only replaces the first instance of the pattern given to it, if we
have multiple occasions of a given pattern, we need to use `gsub()` (for global
substitute).

@@ -471,14 +471,14 @@ want much more than only the last 40, so we need to make several API-calls,
specifying the *"range"*. This is set with the `max_id=` parameter within the
URL. The "ID" is the
[unique identifier of each status/post](https://github.com/tootsuite/documentation/blob/461a17603504811b786084176c65f31ae405802d/Using-the-API/API.md#status).
You can have several parameters with dividing them them the `&` character, which
You can have several parameters in the query string by dividing them by the `&` character, which
will look similar to this:
```
https://DOMAIN.OF.INSTANCE/api/v1/timeline/tag/SEARCHTERM/?limit=40&max_id=IDNUMBER
```

Luckily, we do not have to find out the ID manually. The header of the API
response saved into the `mastodon_reqres` variable also lists the "*next page*"
Luckily, we do not have to find out the ID manually. The header `link` of the API
response is saved into the `mastodon_lheader` variable, it lists the "*next page*"
of results, so we can simply grab this with the `parse_headers()` function from
the `curl` package and use some regex to strip it out:
```

Loading…
Cancel
Save