Skip to content

Commit

Permalink
Merge pull request #177 from zeus-fyi/add-search-indexer-docs
Browse files Browse the repository at this point in the history
Add search indexer docs
  • Loading branch information
ctrl-alt-lulz authored Feb 13, 2024
2 parents 4b34e47 + d752755 commit bb167e8
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Actions",
"position": 4,
"position": 6,
"link": {
"type": "generated-index",
"description": "How to build a manage mockingbird triggered actions."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "API",
"position": 5,
"position": 8,
"link": {
"type": "generated-index",
"description": "How to use the mockingbird API."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Builder",
"position": 3,
"position": 5,
"link": {
"type": "generated-index",
"description": "How to build a mockingbird workflow."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Runs",
"position": 3,
"position": 7,
"link": {
"type": "generated-index",
"description": "How to manage mockingbird workflow runs."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Search",
"position": 4,
"link": {
"type": "generated-index",
"description": "How to mock, preview, and index data."
}
}
48 changes: 48 additions & 0 deletions apps/docusaurus/zeusfyi/docs/mockingbird/search/indexer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
sidebar_position: 2
displayed_sidebar: mockingbird
---

# Indexer

The indexers will use your search parameters and accounts to create a time series of the fetched data every few minutes.
It only requests the latest data since the last time it was run, and should not fetch the same data twice within the
same search group. The indexer will also store the data in the database for archiving and retrieval.

## Twitter

![SScreM](https://github.com/zeus-fyi/zeus/assets/17446735/7026105b-f2bc-462e-8e7b-9c9ddd99d062)

Set the Twitter API OAuth2 credentials in the platform secrets to start indexing tweets,
then set the platform search query using the v2 Twitter search API format.

### Platform Search Query

![ScreenshotM](https://github.com/zeus-fyi/zeus/assets/17446735/067a6fc7-8b0c-4687-8c79-747c9f09ce58)

![ScreensM](https://github.com/zeus-fyi/zeus/assets/17446735/d862eaac-2462-4ce2-b0ca-09f97df714fc)

![ScrM](https://github.com/zeus-fyi/zeus/assets/17446735/a411ed5b-9981-4b72-a819-50f8f25adf2b)

![Screensh2PM](https://github.com/zeus-fyi/zeus/assets/17446735/87528c34-8b1d-4813-9af8-c062eabbbc6b)

![ScrM](https://github.com/zeus-fyi/zeus/assets/17446735/6a11c27e-a28b-417a-a34a-8a677df07b27)

Full
Documentation: https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-recent

## Reddit

![SScreM](https://github.com/zeus-fyi/zeus/assets/17446735/7026105b-f2bc-462e-8e7b-9c9ddd99d062)

Set the Reddit API OAuth2 credentials, user, and password, in the platform secrets to start indexing subreddits.
Also set the routing table as well for reddit retrievals/api calls. If you don't want to use your primary reddit
account, that's fine, you can create a new account and use that for the API credentials as well.

![S](https://github.com/zeus-fyi/zeus/assets/17446735/d2ca5fe5-b191-42fc-a769-ee4f9ca4aaf3)

## Activate / Deactivate Indexing

![ScrM](https://github.com/zeus-fyi/zeus/assets/17446735/b9bb2c6e-58b3-467e-b45a-c59a7bf067e2)

Select the relevant search query row, and click the Activate/Deactivate button to start/stop indexing data.
47 changes: 47 additions & 0 deletions apps/docusaurus/zeusfyi/docs/mockingbird/search/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 1
displayed_sidebar: mockingbird
---

# Search

This section allows you to preview and mock API retrievals, and search indexer results, that you can filter
and sort by date, and filter by negative and positive keywords.

### Search Response Format

Timestamp | Platform | Tweet Body

### Global Indexer Search

![ScreenM](https://github.com/zeus-fyi/zeus/assets/17446735/bf809410-2fcd-4462-b73a-ac7688b12189)

Leaving platform and groups blank will search all platforms and groups you are indexing over the given time period.

## Twitter

![ScM](https://github.com/zeus-fyi/zeus/assets/17446735/f5d6c195-d1a4-49a9-aae3-6f6b234f1cf6)

### Search Response Format

Timestamp | Platform | Tweet Body

## Reddit

![Scrd](https://github.com/zeus-fyi/zeus/assets/17446735/9ee60b2f-d9b9-4ab7-b3b1-311ad2956108)

### Search Response Format

Timestamp | Platform | Subreddit | Post ID | Author | URL | Title | Body

Though it may contain additional field headers for now as we evaluate which should be the defaults,
the search response format will always include the timestamp, platform, and the body of the post.

## API Retrieval Mocking

Here you can verify the API calls using the API platform option and setting the route path. It will
use your authentication credentials to make the API call, if any are set in the platform secrets for the table,
and return the response.

![Sc](https://github.com/zeus-fyi/zeus/assets/17446735/5839a764-8aec-4cf5-9313-1615a3ebfe5a)

0 comments on commit bb167e8

Please sign in to comment.