Lleida.net-iOS 1.0.2

Lleida.net-iOS 1.0.2

Mobile Jazz 维护。



Lleida.net-iOS

Lleida.net 服务客户端

安装

安装 Lleida.net SDK 的最简单方法是通过 Cocoa Pods

pod 'Lleida.net', :git => 'https://github.com/mobilejazz/Lleida.net-iOS.git'

使用

要使用 Lleida.net SDK,您只需通过设置用户名和密码来配置 MJLleidaNetClient 对象;

MJLleidaNetClient *client = [[MJLleidaNetClient alloc] initWithUsername:@"username" password:@"password"];

然后,我们可以调用 API 方法来执行任何所需的操作。例如,如果我们想发送短信,只需调用

// Array of recipients to send the SMS
NSArray *recipients = @[@"+34666778899", 
                        @"+33666554433",
                      ];
                      
// The message to send
NSString *message = @"Hello World Message".

// Sending the SMS
[client sendSMS:message phones:recipients completionBlock:^(MJLleidaNetResult *result, NSError *error) {
    if (error)
        NSLog(@"Network error: %@", error.localizedDescription),
    else if (result.status != MJLleidaNetResultStatusCorrect)
        NSLog(@"Lleida.net error: %@", result.message);
    else
        NSLog(@"All ok");
}];

所有 API 方法都具有相同的完成块,包括 MJLleidaNetResult 实例和一个 NSError。如果发生网络错误,则将包含所有错误详情的 error 实例。否则,则将在 result 实例中包含 Lleida.net 的所有响应。The result.status 将作为请求行动状态的指示器。

披露

此SDK由Mobile Jazz开发,与Lleida.net没有之前的任何合作协议。因此,Mobile Jazz不负责SDK与Lleida.net API的不可预见的可靠性。此外,SDK可能不支持Lleida.net的所有功能,因为我们只包括我们需要的功能。

许可证

版权所有 2015 Mobile Jazz SL

出于Apache License,版本2.0(“许可证”);除非您遵守许可证或书面同意,否则您不得使用此文件。您可以在以下位置获取许可证副本:

https://apache.ac.cn/licenses/LICENSE-2.0

除非适用法律要求或书面同意,否则在许可证下分发的软件按“原样”基础分发,不得提供任何形式的保证或条件,无论是明示的还是暗示的。有关许可协议下权限和限制的具体语言,请参阅许可证。