Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike: Twitter advanced search documentation updates #399

Closed
8 of 25 tasks
lacyg4 opened this issue Jul 2, 2024 · 8 comments · Fixed by #433
Closed
8 of 25 tasks

Spike: Twitter advanced search documentation updates #399

lacyg4 opened this issue Jul 2, 2024 · 8 comments · Fixed by #433
Assignees
Labels
documentation Improvements or additions to documentation spike

Comments

@lacyg4
Copy link

lacyg4 commented Jul 2, 2024

Problem

Users of the Twitter endpoint want more granular search capabilities. Our API supports advanced search this but its not documented. Advanced search queries can be constructed here: https://x.com/search-advanced?lang=en

We currently do not document examples of advanced search in the swagger documentation or developer documentation so people understand the full functionality of the twitter search API.

Here are some examples of advanced search queries:

curl -X 'POST' \
  'http://localhost:8080/api/v1/data/twitter/tweets/recent' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "Masa Moon (from:getmasafi) until:2022-01-01 since:2006-01-01",
  "count": 10
}'
curl -X 'POST' \
  'http://localhost:8080/api/v1/data/twitter/tweets/recent' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "(Masa OR CoinList)(from:getmasafi) until:2022-01-01 since:2006-01-01",
  "count": 10
}'

These developer documentation can be found here: https://help.x.com/en/using-x/x-advanced-search

Customer feedback

https://masafinance.slack.com/archives/C078JCDS81E/p1719870998918199
https://masafinance.slack.com/archives/C073K1YP8CR/p1717494858189539

Acceptance criteria:

  1. Documentation Structure:

    • Create a single, dedicated "Advanced Search" section in the API documentation
    • Implement a dropdown or tabbed interface for users to select different search types TBD
  2. Search Type Documentation:

    • For each search type, provide:
      • A brief description of the search type
      • The correct syntax or format to use
      • At least one clear example of usage
      • Any relevant limitations or special considerations
  3. Testing:

    • Conduct user testing to ensure the documentation is easy to understand and use
    • Verify all examples are correct and functional

Advance search to support:

  • Exact phrase search
  • Hashtag search
  • Mention search (@ symbol)
  • From user search
  • To user search
  • Language-specific search
  • Date range search
  • Retweets filtering
  • Minimum likes filter
  • Minimum retweets filter
  • Keyword exclusion (NOT operator)
  • OR operator for multiple terms
  • Geo-location based search
  • URL inclusion search
  • Question tweets filter
  • Safe search mode

Possible solutions

  1. Document each case in swagger as an example (expensive)
  2. Document each search query and have a couple of examples in dev docs
@lacyg4 lacyg4 changed the title Twitter advanced feature documentation updates feat: Twitter advanced feature documentation updates Jul 2, 2024
@teslashibe teslashibe changed the title feat: Twitter advanced feature documentation updates feat: Twitter advanced search documentation updates Jul 2, 2024
@teslashibe
Copy link
Contributor

teslashibe commented Jul 2, 2024

We may want to think about renaming the /data/twitter/tweets/recent endpoint to /data/twitter/tweets

Image

@giovaroma giovaroma self-assigned this Jul 2, 2024
@giovaroma
Copy link

@teslashibe updated the advance search option from Twitter and the acceptance criteria, please review the list of advance search options and let me know if this looks correct or we should remove some.

@lacyg4 lacyg4 self-assigned this Jul 3, 2024
@teslashibe
Copy link
Contributor

teslashibe commented Jul 3, 2024

@giovaroma this looks fantastic - let move forward with this.

I have added this to a release in the roadmap here: masa-finance/roadmap#2 (cc @mudler @H34D @Luka-Loncar)

I changed this to "In review" on product board added this to no-status in the protocol board and it can be groomed on Monday

@giovaroma
Copy link

Wonderful, moving tickets down the pipeline @teslashibe

@mudler
Copy link
Contributor

mudler commented Jul 4, 2024

potentially a duplicate of #362 ?

@mudler mudler added the documentation Improvements or additions to documentation label Jul 4, 2024
@mudler mudler added the triage label Jul 4, 2024
@mudler
Copy link
Contributor

mudler commented Jul 4, 2024

Exact match documentation depends on #351

@Luka-Loncar Luka-Loncar changed the title feat: Twitter advanced search documentation updates Spike: Twitter advanced search documentation updates Jul 8, 2024
@Luka-Loncar Luka-Loncar added spike and removed triage labels Jul 8, 2024
@nolanjacobson nolanjacobson self-assigned this Jul 18, 2024
@Luka-Loncar
Copy link

Exact match and advanced search should be tested first. @nolanjacobson

@mudler
Copy link
Contributor

mudler commented Jul 29, 2024

This has been done and QA'd, follow-up #459

@mudler mudler closed this as completed Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation spike
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants