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

Create FullArchiveSearchDemo.java #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rahulchaube1
Copy link

Changes Made:
Error Handling:

Added proper error handling to ensure the program doesn't crash unexpectedly.
Included checks for the bearerToken to ensure it is not null or empty.
Added max_results Parameter:

Added max_results to limit the number of results returned. Adjust it as per your requirements (e.g., 10, 50, or 100).
Improved Readability:

Added comments to clarify each section of the code.
Improved formatting for better readability.
Enhanced Logging:

Included error messages and stack trace printing to help debug potential issues.
Default Content-Type:

Set the Content-Type header explicitly to application/json to match API requirements.
Usage:
Ensure you have the Twitter API v2 Bearer Token set as an environment variable (BEARER_TOKEN).
Run the code. It will search tweets using the Full Archive Search endpoint based on the provided query. Adjust the query as needed.

fullarchivesearchdemo

Signed-off-by: Rahul Chaube <[email protected]>
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

Copy link

@fochoao-alt fochoao-alt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants