Skip to content

Itzskade/42_api_viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README Spanish

42 API Project Viewer

A small Ruby script that connects to the 42 Intra API and displays a user's validated and non‑validated projects with colored output.

This tool is simple, lightweight, and easy to run on any system.


📦 Requirements

On Fedora:

sudo dnf install rbenv ruby-build

On Arch / Manjaro:

sudo pacman -S rbenv ruby-build

On Ubuntu / Debian:

sudo apt install rbenv ruby-build

Then add rbenv to your shell:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init - bash)"' >> ~/.bashrc
source ~/.bashrc

or:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zhsrc
echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc
source ~/.zshrc
  • Ruby 3.3.x (recommended)
rbenv install 3.3.10
rbenv local 3.3.10
  • Bundler
gem install bundler

🔑 Environment variables

Create a .env file in the project folder with the following content:

UID=your_api_uid_here
SECRET=your_api_secret_here

You can generate these credentials from your 42 profile under “OAuth Applications”.


🔧 Installation

git clone https://github.com/itzksade/42_api.git
cd 42_api
bundle install

▶️ Usage


./42_api_viewer.rb <login>
or
bundle exec ruby 42_api_viewer.rb <login>

The script will show:

  • ✔ Validated projects (green)
  • ✘ Non‑validated projects (red)
  • Final marks for each project

📝 Notes

  • The script uses the OAuth2 client_credentials flow
  • Colors work in most terminals (Linux, macOS, WSL)
  • You can make the script executable with chmod +x if you prefer running it directly

📜 License

Free to use and modify.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages