TwitchTV JSON API 2

Developer
Size
2,691 Kb
Views
6,072

How do I make an twitchtv json api 2?

What is a twitchtv json api 2? How do you make a twitchtv json api 2? This script and codes were developed by Jimmy Lin on 11 December 2022, Sunday.

TwitchTV JSON API 2 Previews

TwitchTV JSON API 2 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>TwitchTV JSON API 2</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<div class="container">
<div id = "header" class ="text-center">
<h1>TwitchTV JSON API</h1>
<a href = "https://www.twitch.tv/freecodecamp" target = "blank"> <h3 id="fccStatus" class ="text-center"></h3> </div> </a>
<h1>
<div class = "row" id= "top"> <div class = "col-md-4">Logo:</div> <div class = "col-md-4">Display Name:</div> <div class = "col-md-4">Status:</div>
</div>
</h1> <div id="followerInfo"> </div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

TwitchTV JSON API 2 - Script Codes CSS Codes

body{ font-family:'Lobster'; background-size:cover; background-color: #d8d8d8;
}
#header{ border: 5px solid; border-radius:25px;
}
img{ width:100px; height:100px; border-radius:50%;
}
.col-md-4{ padding:10px;
}
.row{ border: 5px solid; border-radius:25px; margin-bottom:10px;
}

TwitchTV JSON API 2 - Script Codes JS Codes

//Run our jQuery
$(document).ready(function() { //Array to store FCC followers // var following = []; $.ajax({ type: "GET", url: "https://api.twitch.tv/kraken/streams/freecodecamp", headers:{ 'Client-ID': 'lpcfra5atdz9k7jtdldz5729cfh4zua' }, success: function(data1){ if (data1.stream === null) { //FCC Offline $("#fccStatus").html("Free Code Camp is currently OFFLINE"); } else { //FCC Online $("#fccStatus").html("Free Code Camp is currently LIVE"); } } }); $.ajax({ type: "GET", url: "https://api.twitch.tv/kraken/users/freecodecamp/follows/channels/", headers:{ 'Client-ID': 'lpcfra5atdz9k7jtdldz5729cfh4zua' }, success: function(data2){ for (var i = 0; i < data2.follows.length; i++) { //gets displayName var displayName = data2.follows[i].channel.display_name; var logo = data2.follows[i].channel.logo; var status= data2.follows[i].channel.status; if(logo==null){ logo="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSeF9yiuuOJBNO8VpXsVp2VQIpBSTPdLKW6uB3AI-jmSX9G74bX1g"; } $("#followerInfo").prepend("<div class ='row'>" + "<div class='col-md-4'>" + "<img src='" + logo + "'>" + "</div>" + "<div class='col-md-4'>" + displayName + "</div>" + "<div class='col-md-4'>" + status + "</div></div>"); } } }); var deletedFollowers=['brunofin', 'comster404']; for(var i=0;i<deletedFollowers.length;i++){ $.ajax({ type: "GET", url: "https://api.twitch.tv/kraken/streams/"+deletedFollowers[i], headers:{ 'Client-ID': 'lpcfra5atdz9k7jtdldz5729cfh4zua' }, error: function(data3){ var logo="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSeF9yiuuOJBNO8VpXsVp2VQIpBSTPdLKW6uB3AI-jmSX9G74bX1g"; var displayName= data3.statusText; var status= data3.status; $("#followerInfo").prepend("<div class ='row'>" + "<div class='col-md-4'>" + "<img src='" + logo + "'>" + "</div>" + "<div class='col-md-4'>" + displayName + "</div>" + "<div class='col-md-4'>" + status + "</div></div>"); } }); }
});
TwitchTV JSON API 2 - Script Codes
TwitchTV JSON API 2 - Script Codes
Home Page Home
Developer Jimmy Lin
Username odylic
Uploaded December 11, 2022
Rating 3
Size 2,691 Kb
Views 6,072
Do you need developer help for TwitchTV JSON API 2?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jimmy Lin (odylic) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!