Skip to content

Flutter Project to delete CuriousCat tweets from your Twitter account!

License

Notifications You must be signed in to change notification settings

hadysata/CuriousCat-Deleter

Repository files navigation

CuriousCat Deleter App

Pub Version APLv2

Flutter Project to delete CuriousCat tweets from your Twitter account!

Table of Contents

Contribute to This Project

Repo Issues

If you find a bug throughout your development or testing process, please do not hesitate to file an issue describing the bug you noticed.

How to File an Issue?

Here is how you create an issue:

  • Go to the issues tab.
  • Click on "New issue".
  • Add an informative title following the naming convention below.
  • Add a detailed description with the suggested solution if possible.
  • Select applicable labels after reading each label's description.

Creating a New Branch

If you want to start working on a new feature/fix a bug, create a new branch with a descriptive title preceded by your name as @yourname/new-feature-title.

Note: branch names are all small cases separated by a dash -, e.g. @hady/twitter-api-migration

Conventions

Commits and PRs

The commit message should be structured as follows:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

The commit contains the following structural elements:

  • fix: a commit of the type fix patches a bug in the codebase.

  • feat: a commit of the type feat introduces a new feature to the codebase.

  • BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking change.

  • types other than fix: and feat: are allowed, for example build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.

Refer to Conventional Commits for more information.

Dart File Naming

  • Small letters only.
  • Use underscore as delimiters.
  • Keep it short, clear, and simple.

Examples : date_helper.dart settings_controller.dart

Build, Run and Deploy

This project is intended to be used with the latest Active release of Flutter & Dart

Clone Repository

To clone this repo:

  1. Open a new terminal/powershell window.

  2. Clone the repo:

    git clone https://github.com/hadysata/CuriousCat-Deleter.git
  3. Open the project in your favorite IDE/Code editor

Setup

  1. In the project root folder, run
flutter pub get
  1. In the project root folder, create a new .env file with the following variables:
CLIENT_ID=
CLIENT_SECRET=
REDIRECT_URI=
URI_SCHEME=

These are Twitter keys used by the app to use Twitter API; you can get these keys from Twitter developer portal

1- Go to the developer portal, click on Overview

Screenshot 2023-04-26 at 8 46 58 PM

2- Create a new native app

Screenshot 2023-04-27 at 1 56 58 AM

3- Make sure to have the same settings as below

Screenshot 2023-04-26 at 8 45 59 PM

REDIRECT_URI & URI_SCHEME should look something similar to:

REDIRECT_URI=com.hadysata.curiouscatdeleter.oauth://callback/
URI_SCHEME=com.hadysata.curiouscatdeleter.oauth

URI_SCHEME should be the same is your app bundle id

Run

To run the script, in the project root folder run:

flutter run

Rate limit

For the delete tweet endpoint, user rate limit: 50 requests per 15-minute window per each authenticated user.

There is a script in the code to handle this rate limit, but sometimes Twitter API doesn't return the status or show that the rate limit is reached, so if you encountered any issue, wait 15 minute.

License

Licensed under the APLv2. See the LICENSE file for details.