login
Returns access token
/api/login
Usage and SDK Samples
curl -X POST "http://dev.itjunkies.in/api/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LoginApi;
import java.io.File;
import java.util.*;
public class LoginApiExample {
public static void main(String[] args) {
LoginApi apiInstance = new LoginApi();
String contentType = contentType_example; // String | Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
Auth request = ; // Auth |
try {
authTokenResponse result = apiInstance.login(contentType, request);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LoginApi#login");
e.printStackTrace();
}
}
}
import io.swagger.client.api.LoginApi;
public class LoginApiExample {
public static void main(String[] args) {
LoginApi apiInstance = new LoginApi();
String contentType = contentType_example; // String | Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
Auth request = ; // Auth |
try {
authTokenResponse result = apiInstance.login(contentType, request);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LoginApi#login");
e.printStackTrace();
}
}
}
String *contentType = contentType_example; // Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
Auth *request = ; //
LoginApi *apiInstance = [[LoginApi alloc] init];
[apiInstance loginWith:contentType
request:request
completionHandler: ^(authTokenResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var NodeAndMysqlSwaggerDocumentation = require('node_and_mysql_swagger_documentation');
var api = new NodeAndMysqlSwaggerDocumentation.LoginApi()
var contentType = contentType_example; // {String} Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
var request = ; // {Auth}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.login(contentType, request, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class loginExample
{
public void main()
{
var apiInstance = new LoginApi();
var contentType = contentType_example; // String | Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
var request = new Auth(); // Auth |
try
{
authTokenResponse result = apiInstance.login(contentType, request);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling LoginApi.login: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\LoginApi();
$contentType = contentType_example; // String | Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
$request = ; // Auth |
try {
$result = $api_instance->login($contentType, $request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LoginApi->login: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LoginApi;
my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $contentType = contentType_example; # String | Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
my $request = WWW::SwaggerClient::Object::Auth->new(); # Auth |
eval {
my $result = $api_instance->login(contentType => $contentType, request => $request);
print Dumper($result);
};
if ($@) {
warn "Exception when calling LoginApi->login: $@\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.LoginApi()
contentType = contentType_example # String | Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
request = # Auth |
try:
api_response = api_instance.login(contentType, request)
pprint(api_response)
except ApiException as e:
print("Exception when calling LoginApi->login: %s\n" % e)
Parameters
Header parameters
Name | Description |
---|---|
Content-Type* |
String
Content-Type entity header is used to indicate the media type of the resource. Accepted value 'application/x-www-form-urlencoded'
Required
|
Body parameters
Name | Description |
---|---|
request * |