Skip to content

An api that can do the activities you can do with your twitch account

License

Notifications You must be signed in to change notification settings

suphiyasin/Twitch-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues Hits


image

Twitch Api V1.0.0

twitch login, 2 factor login, follow/unfollow streamers, report inappropriate broadcasts and new features as the day progresses..
Feedback
Türkçe

About the project

Twitch login, 2 factor login, follow/unfollow streamers, report inappropriate broadcasts and new features as the day progresses..

Requirements

  • PHP 7.4 or higher

Using the repo by downloading

  1. This download script
  2. Edit test.php:8
  3. Run test.php

Examples

Login

<?php
session_start();
include("api.php");
$use = new tw();
$look = $use->login("TWITCH-USERNAME", "TWITCH-PASSWORD");
echo $look;

Two Factor Login

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$look = $use->login("TWITCH-USERNAME", "TWITCH-PASSWORD");
echo $look;
if(isset($_POST['codetoken'])){
	$check = $use->twofactor($_POST['codetoken'], $_POST['code']);
	echo $check;
}

Follow

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$use->follow("wtcn");

Unfollow

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$use->unfollow("wtcn");

Info

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$info = $use->getInfo("wtcn");
//0 = bio , 1 = username, 2 = pplink, 3 = offline pp, 4 = viewcount, 5 = Create Date, 6 = display name
$a = explode("`", $info);
echo '<img src="'.$a[3].'"/>';

Report Streamer

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$use->report("reason for report", "StreamerUsername");

About

An api that can do the activities you can do with your twitch account

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages