Unplugg

Unplugg

Machine Learning

Forecasting API for time series data. This API currently provides forecasting for time series data that you can test below. You can use it to forecast energy consumption, temperature, or any other time series data which has some seasonality effect.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Unplugg

🚀 Quick Start Examples

Unplugg Javascript Examplejavascript
// Unplugg API Example
const response = await fetch('https://unplu.gg/test_api.html', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Getting Started with the Unplugg API

If you're looking for an easy and intuitive API that lets you query user data, look no further than Unplugg API. With its simple syntax and robust documentation, you'll be up and running with minimal effort. Here are some examples of using the Unplugg API in JavaScript:

Authenticating Requests

Authentication can be done using an Authorization header that includes a Bearer token. You can obtain a token by creating an account on our website. Once you've done that, here's how you can authenticate your requests:

const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."; // Your token goes here

const requestOptions = {
    headers: { "Authorization": `Bearer ${token}` }
};

fetch("https://unplu.gg/api/users", requestOptions)
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error(error));

Retrieving User Data

You can retrieve user data by making a GET request to our /api/users endpoint. Here's an example:

fetch("https://unplu.gg/api/users", requestOptions)
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error(error));

This will return an array of user objects that contain information about each user, such as their name, email address, and profile picture.

Updating User Data

You can update user data by making a PUT request to our /api/users/:id endpoint, where :id is the ID of the user you want to update. Here's an example of how to update a user's email address:

const user = { email: "new_email@example.com" }; // The updated user object

fetch("https://unplu.gg/api/users/1234", {
    method: "PUT",
    headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`
    },
    body: JSON.stringify(user)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));

This will update the email address of the user with ID 1234 to new_email@example.com.

Conclusion

These examples should give you a good idea of how to use the Unplugg API in your JavaScript projects. If you run into any issues, be sure to consult our API documentation for more information. Happy coding!

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

May 31Jun 2Jun 4Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 2904008001440Minutes
Online
Offline

Related APIs in Machine Learning