sendChat
Crea un nuevo chat
/user/chat
Usage and SDK Samples
curl -X POST "https://virtserver.swaggerhub.com/U97/faceSOS/1.0.0/user/chat?from=&to="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChatApi;
import java.io.File;
import java.util.*;
public class ChatApiExample {
public static void main(String[] args) {
ChatApi apiInstance = new ChatApi();
Integer from = 56; // Integer | Id del usuario que envia el chat
Integer to = 56; // Integer | Id del usuario que recibe el chat
ChatContent body = ; // ChatContent |
try {
ChatInfo result = apiInstance.sendChat(from, to, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChatApi#sendChat");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ChatApi;
public class ChatApiExample {
public static void main(String[] args) {
ChatApi apiInstance = new ChatApi();
Integer from = 56; // Integer | Id del usuario que envia el chat
Integer to = 56; // Integer | Id del usuario que recibe el chat
ChatContent body = ; // ChatContent |
try {
ChatInfo result = apiInstance.sendChat(from, to, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ChatApi#sendChat");
e.printStackTrace();
}
}
}
Integer *from = 56; // Id del usuario que envia el chat
Integer *to = 56; // Id del usuario que recibe el chat
ChatContent *body = ; // (optional)
ChatApi *apiInstance = [[ChatApi alloc] init];
// Crea un nuevo chat
[apiInstance sendChatWith:from
to:to
body:body
completionHandler: ^(ChatInfo output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var FaceSosApi = require('face_sos_api');
var api = new FaceSosApi.ChatApi()
var from = 56; // {{Integer}} Id del usuario que envia el chat
var to = 56; // {{Integer}} Id del usuario que recibe el chat
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.sendChat(fromto, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class sendChatExample
{
public void main()
{
var apiInstance = new ChatApi();
var from = 56; // Integer | Id del usuario que envia el chat
var to = 56; // Integer | Id del usuario que recibe el chat
var body = new ChatContent(); // ChatContent | (optional)
try
{
// Crea un nuevo chat
ChatInfo result = apiInstance.sendChat(from, to, body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ChatApi.sendChat: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiChatApi();
$from = 56; // Integer | Id del usuario que envia el chat
$to = 56; // Integer | Id del usuario que recibe el chat
$body = ; // ChatContent |
try {
$result = $api_instance->sendChat($from, $to, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChatApi->sendChat: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChatApi;
my $api_instance = WWW::SwaggerClient::ChatApi->new();
my $from = 56; # Integer | Id del usuario que envia el chat
my $to = 56; # Integer | Id del usuario que recibe el chat
my $body = WWW::SwaggerClient::Object::ChatContent->new(); # ChatContent |
eval {
my $result = $api_instance->sendChat(from => $from, to => $to, body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ChatApi->sendChat: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.ChatApi()
from = 56 # Integer | Id del usuario que envia el chat
to = 56 # Integer | Id del usuario que recibe el chat
body = # ChatContent | (optional)
try:
# Crea un nuevo chat
api_response = api_instance.send_chat(from, to, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ChatApi->sendChat: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| body |
| Name | Description |
|---|---|
| from* |
Integer
(int10)
Id del usuario que envia el chat
Required
|
| to* |
Integer
(int10)
Id del usuario que recibe el chat
Required
|