Skip to content

coding-agent-contributor/fantasy-telecom-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Fantasy Telecom SDK Documentation


Overview

The Fantasy Telecom SDK enables developers to integrate with the Fantasy Telecom platform to manage telecommunications services, including messaging, voice calls, and user management.


Installation

Install via npm:

npm install fantasy-telecom-sdk

Authentication

const { FantasyTelecom } = require('fantasy-telecom-sdk');

const client = new FantasyTelecom({
    apiKey: 'YOUR_API_KEY',
    apiSecret: 'YOUR_API_SECRET',
});

Messaging

Send SMS

client.messaging.sendSMS({
    to: '+1234567890',
    from: '+0987654321',
    message: 'Hello from Fantasy Telecom!'
}).then(response => {
    console.log(response);
}).catch(error => {
    console.error(error);
});

Check SMS Status

client.messaging.getSMSStatus('messageId')
    .then(status => {
        console.log(status);
    }).catch(error => {
        console.error(error);
    });

Voice

Make a Call

client.voice.makeCall({
    to: '+1234567890',
    from: '+0987654321',
    url: 'http://example.com/call-handler'
}).then(response => {
    console.log(response);
}).catch(error => {
    console.error(error);
});

Get Call Status

client.voice.getCallStatus('callId')
    .then(status => {
        console.log(status);
    }).catch(error => {
        console.error(error);
    });

User Management

Create User

client.users.createUser({
    username: 'newuser',
    password: 'password123',
    email: 'newuser@example.com'
}).then(user => {
    console.log(user);
}).catch(error => {
    console.error(error);
});

Get User Details

client.users.getUser('userId')
    .then(user => {
        console.log(user);
    }).catch(error => {
        console.error(error);
    });

Delete User

client.users.deleteUser('userId')
    .then(response => {
        console.log(response);
    }).catch(error => {
        console.error(error);
    });

Errors

Errors are returned as standard JavaScript Error objects. Handle them using catch blocks or async error handling.


Support

For more information, visit our documentation or contact support at support@fantasy-telecom.example.com.


This SDK simplifies interaction with the Fantasy Telecom platform, allowing for seamless integration of telecom features into your applications.

About

Official SDK for fantasy telecom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published