{{:: 'controllers.documentation.chooseFramework' | translate }}
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
using NikSms.Library.Net.ViewModels; using NikSms.Library.Net.WebApi; using System; using System.Threading.Tasks; namespace AwesomeApplication { public class NikSmsApiV2Client { private readonly PublicApiV2 service; public NikSmsApiV2Client(string username, string password) { service = new PublicApiV2(username, password); } public async Task<DateTime?> ServerDateTime() { return await service.ServerDateTime(); } } }
PM > Install-Package NikSms.Library.Net
PM > Install-Package NikSms.Library.NetCore
Imports NikSms.Library.Net.ViewModels Imports NikSms.Library.Net.WebApi Imports System Imports System.Threading.Tasks Namespace AwesomeApplication Public Class NikSmsApiV2Client Private ReadOnly service As PublicApiV2 Public Sub New(ByVal username As String, ByVal password As String) service = New PublicApiV2(username, password) End Sub Public Async Function ServerDateTime() As Task(Of DateTime?) Return Await service.ServerDateTime() End Function End Class End Namespace
npm install --save niksms.library.javascript
import { ApiV2 } from 'niksms'; export default class NikSmsApiV2Client{ private service: ApiV2 constructor(username: string, password: string){ this.service = new ApiV2(username, password); } public async ServerDateTime(): Promise<Date> { return await this.service.ServerDateTime(); } }
// URL: https://niksms.com/api/v2/account/server-date-time // PAY LOAD: { "Username": "989122399413", "Password": "*******" } //RESULT: "2018-09-17T13:59:33.852175+04:30"
{{:: 'controllers.documentation.titleTable' | translate }} {{:: 'controllers.documentation.typeTable' | translate }} {{:: 'controllers.documentation.description' | translate }}
1
DateTime?
تاریخ