Files
xui-one-api-docs/UPLOAD_INSTRUCTIONS.md
T
2025-12-12 15:07:46 +03:00

6.9 KiB

🚀 Upload Instructions for XUI.ONE API Documentation

📦 What You Have

I've created a complete documentation structure for XUI.ONE API with:

  • OpenAPI 3.0.3 specification (openapi.yaml)
  • Interactive Swagger UI (index.html)
  • Comprehensive README
  • Getting Started guide
  • Contributing guidelines
  • Deployment instructions
  • Automated upload script
  • MIT License
  • .gitignore file

Current Status: Category 1 (Authentication & Getting Started) is COMPLETE


🎯 Quick Start (2 Options)

Option A: Automatic Upload (Easiest)

  1. Open Terminal in the project folder
  2. Run the script:
    cd xui-one-api-docs
    ./upload-to-github.sh
    
  3. Follow prompts and enter GitHub credentials
  4. Done! 🎉

Option B: Manual Upload

  1. Open Terminal in the project folder
  2. Run these commands:
cd xui-one-api-docs

# Initialize git
git init

# Add remote
git remote add origin https://github.com/worldofiptvcom/xui-one-api-docs.git

# Stage all files
git add .

# Commit
git commit -m "Initial commit: Add XUI.ONE API documentation with authentication section"

# Set branch name
git branch -M main

# Push to GitHub
git push -u origin main
  1. Enter GitHub credentials when prompted
  2. Done! 🎉

🔐 GitHub Authentication

You'll need to authenticate when pushing. Here are your options:

  1. Go to GitHub:

    • Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Generate new token:

    • Click "Generate new token (classic)"
    • Give it a name: "XUI API Docs"
    • Select scope: repo (Full control of private repositories)
    • Click "Generate token"
    • Copy the token immediately (you won't see it again!)
  3. Use token when pushing:

    • Username: worldofiptvcom
    • Password: <paste your token here>

Alternative: GitHub CLI

# Install GitHub CLI (if not installed)
# macOS:
brew install gh

# Linux:
sudo apt install gh

# Windows:
winget install --id GitHub.cli

# Authenticate
gh auth login

# Then push normally
git push -u origin main

🌐 Deploy Documentation Website

After uploading to GitHub:

Step 1: Enable GitHub Pages

  1. Go to: https://github.com/worldofiptvcom/xui-one-api-docs
  2. Click Settings tab
  3. Scroll to Pages (left sidebar)
  4. Under Build and deployment:
    • Source: Deploy from a branch
    • Branch: main
    • Folder: / (root)
  5. Click Save

Step 2: Wait for Deployment

  • GitHub will automatically build your site (1-2 minutes)
  • Check progress in Actions tab

Step 3: Access Your Live Documentation

Your documentation will be available at:

https://worldofiptvcom.github.io/xui-one-api-docs/

Open index.html for the interactive Swagger UI! 🎊


📁 What's Included

xui-one-api-docs/
├── 📄 openapi.yaml                    # Main API specification (OpenAPI 3.0.3)
├── 🌐 index.html                      # Interactive Swagger UI
├── 📖 README.md                       # Project overview and documentation
├── 🚀 DEPLOYMENT.md                   # Detailed deployment guide
├── 🤝 CONTRIBUTING.md                 # Contribution guidelines
├── 📄 LICENSE                         # MIT License
├── 🙈 .gitignore                      # Git ignore rules
├── 📜 upload-to-github.sh            # Automated upload script
├── docs/
│   ├── 📘 getting-started.md         # Complete setup guide
│   ├── categories/
│   │   └── 📋 01-get-info.md         # Placeholder for next category
│   └── examples/                      # (Empty - for future code examples)
└── postman/                           # (Empty - for future Postman collection)

Completed in This Release

1. Authentication & Setup

  • user_info endpoint fully documented
  • Complete OpenAPI specification
  • Authentication guide
  • Security best practices
  • Example code in cURL, Python, PHP, JavaScript

2. Project Infrastructure

  • GitHub repository structure
  • Contributing guidelines
  • Deployment instructions
  • Automated upload script
  • Interactive Swagger UI

🔄 Next Steps (Future Categories)

After uploading, we'll add documentation for:

  1. GET INFO - Query operations (get_lines, get_users, get_streams, etc.)
  2. Line API - Subscription management
  3. Logs & Events - Monitoring
  4. User API - User management
  5. MAG API - MAG devices
  6. Enigma API - Enigma2 STBs
  7. Streams API - Live streams
  8. Channel API - Channels
  9. Station API - Radio stations
  10. Movie API - VOD movies
  11. Series API - Series
  12. Episode API - Episodes
  13. Servers API - Server management

Each category will include:

  • Complete endpoint documentation
  • All parameters
  • Response examples
  • Code examples in multiple languages
  • Use cases and best practices

🧪 Test Locally Before Uploading

Want to preview the documentation first?

cd xui-one-api-docs

# Option 1: Python
python3 -m http.server 8000

# Option 2: Node.js
npx http-server

# Option 3: PHP
php -S localhost:8000

Then open: http://localhost:8000/index.html


🆘 Troubleshooting

Problem: "Permission denied" when running script

Solution:

chmod +x upload-to-github.sh
./upload-to-github.sh

Problem: "Authentication failed"

Solution:

  • Use Personal Access Token instead of password
  • Make sure token has repo scope
  • Or use GitHub CLI: gh auth login

Problem: "Repository not found"

Solution:

Problem: Changes not showing on GitHub Pages

Solution:

  • Clear browser cache
  • Wait 1-2 minutes for rebuild
  • Check Actions tab for deployment status

📞 Need Help?

  1. Check DEPLOYMENT.md - Detailed deployment guide
  2. Check CONTRIBUTING.md - How to contribute
  3. Open GitHub Issue - Report problems
  4. World of IPTV Forums - Community support

🎉 You're All Set!

Once uploaded, you'll have:

  • Professional API documentation
  • Interactive testing interface (Swagger UI)
  • Live website on GitHub Pages
  • Version controlled documentation
  • Community contribution ready
  • Foundation for remaining categories

Ready to upload? Run: ./upload-to-github.sh


📝 After Upload Checklist

  • Repository uploaded successfully
  • GitHub Pages enabled
  • Documentation website accessible
  • Swagger UI working correctly
  • Update repository description on GitHub
  • Add topics/tags to repository (api, documentation, iptv, xuione, openapi)
  • Share with community!

Made with ❤️ for the XUI.ONE community

Questions? Open an issue on GitHub!