-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from maduraPradeep/master
updated package + readme to squarelabs
- Loading branch information
Showing
28 changed files
with
187 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
.../squaremobile/shoutout/sdk/ApiClient.java → ...om/squarelabs/shoutout/sdk/ApiClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...uaremobile/shoutout/sdk/ApiException.java → ...squarelabs/shoutout/sdk/ApiException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aremobile/shoutout/sdk/Configuration.java → ...quarelabs/shoutout/sdk/Configuration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a/com/squaremobile/shoutout/sdk/Pair.java → ...ava/com/squarelabs/shoutout/sdk/Pair.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...squaremobile/shoutout/sdk/StringUtil.java → ...m/squarelabs/shoutout/sdk/StringUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...obile/shoutout/sdk/api/ActivitiesApi.java → ...elabs/shoutout/sdk/api/ActivitiesApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...emobile/shoutout/sdk/api/ContactsApi.java → ...arelabs/shoutout/sdk/api/ContactsApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 8 additions & 9 deletions
17
...emobile/shoutout/sdk/api/MessagesApi.java → ...arelabs/shoutout/sdk/api/MessagesApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...emobile/shoutout/sdk/auth/ApiKeyAuth.java → ...arelabs/shoutout/sdk/auth/ApiKeyAuth.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ile/shoutout/sdk/auth/Authentication.java → ...abs/shoutout/sdk/auth/Authentication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...bile/shoutout/sdk/auth/HttpBasicAuth.java → ...labs/shoutout/sdk/auth/HttpBasicAuth.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...squaremobile/shoutout/sdk/auth/OAuth.java → ...m/squarelabs/shoutout/sdk/auth/OAuth.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...remobile/shoutout/sdk/auth/OAuthFlow.java → ...uarelabs/shoutout/sdk/auth/OAuthFlow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...le/shoutout/sdk/model/ActivityRecord.java → ...bs/shoutout/sdk/model/ActivityRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aremobile/shoutout/sdk/model/Contact.java → ...quarelabs/shoutout/sdk/model/Contact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...obile/shoutout/sdk/model/ContactList.java → ...elabs/shoutout/sdk/model/ContactList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...aremobile/shoutout/sdk/model/Message.java → ...quarelabs/shoutout/sdk/model/Message.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...le/shoutout/sdk/model/MessageContent.java → ...bs/shoutout/sdk/model/MessageContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/shoutout/sdk/model/MessageResponse.java → ...s/shoutout/sdk/model/MessageResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...remobile/shoutout/sdk/model/Response.java → ...uarelabs/shoutout/sdk/model/Response.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/main/java/com/squarelabs/shoutout/sdk/sample/ActivityRecordPost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.squarelabs.shoutout.sdk.sample; | ||
|
||
import com.squarelabs.shoutout.sdk.ApiClient; | ||
import com.squarelabs.shoutout.sdk.Configuration; | ||
import com.squarelabs.shoutout.sdk.api.ActivitiesApi; | ||
import com.squarelabs.shoutout.sdk.auth.ApiKeyAuth; | ||
import com.squarelabs.shoutout.sdk.model.ActivityRecord; | ||
import com.squarelabs.shoutout.sdk.model.Response; | ||
|
||
/** | ||
* Created by Madura on 14/07/2016. | ||
*/ | ||
public class ActivityRecordPost { | ||
|
||
public static void main(String[] args) { | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
// Configure API key authorization: ShoutOUTCustomAuthorizer | ||
ApiKeyAuth ShoutOUTCustomAuthorizer = (ApiKeyAuth) defaultClient.getAuthentication("ShoutOUTCustomAuthorizer"); | ||
ShoutOUTCustomAuthorizer.setApiKeyPrefix("Apikey"); | ||
ShoutOUTCustomAuthorizer.setApiKey("YOUR API KEY");//Set Api Token | ||
|
||
try { | ||
ActivitiesApi api = new ActivitiesApi(); | ||
ActivityRecord activityRecord = new ActivityRecord(); | ||
activityRecord.setActivityId("ACTIVITY_ID"); | ||
activityRecord.setActivityName("ACTIVITY_NAME"); | ||
activityRecord.setUserId("USER_ID");//your userId | ||
activityRecord.setActivityData(new ActivityData("signup","John")); | ||
Response response = api.createActivity(activityRecord,ShoutOUTCustomAuthorizer.getApiKey()); | ||
//Do your stuff with the response | ||
System.out.println("Message:"+response.getMessage()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
//Arbitrary object based on the attributes in the event you created | ||
public static class ActivityData { | ||
private String status,name;//arbitrary properties | ||
|
||
public ActivityData(String status, String name) { | ||
this.status = status; | ||
this.name = name; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/com/squarelabs/shoutout/sdk/sample/MessagePost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.squarelabs.shoutout.sdk.sample; | ||
|
||
|
||
import com.squarelabs.shoutout.sdk.ApiClient; | ||
import com.squarelabs.shoutout.sdk.Configuration; | ||
import com.squarelabs.shoutout.sdk.api.MessagesApi; | ||
import com.squarelabs.shoutout.sdk.auth.ApiKeyAuth; | ||
import com.squarelabs.shoutout.sdk.model.Message; | ||
import com.squarelabs.shoutout.sdk.model.MessageContent; | ||
import com.squarelabs.shoutout.sdk.model.MessageResponse; | ||
|
||
import java.util.Arrays; | ||
|
||
/** | ||
* Created by Madura on 14/07/2016. | ||
*/ | ||
public class MessagePost { | ||
|
||
|
||
public static void main(String[] args) { | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
// Configure API key authorization: ShoutOUTCustomAuthorizer | ||
ApiKeyAuth ShoutOUTCustomAuthorizer = (ApiKeyAuth) defaultClient.getAuthentication("ShoutOUTCustomAuthorizer"); | ||
ShoutOUTCustomAuthorizer.setApiKeyPrefix("Apikey"); | ||
ShoutOUTCustomAuthorizer.setApiKey("YOUR API KEY");//Set Api Token | ||
|
||
try { | ||
MessagesApi api = new MessagesApi(); | ||
Message message = new Message(); | ||
MessageContent messageContent = new MessageContent(); | ||
messageContent.setSms("Hello, This is a test message"); //sms content | ||
message.setContent(messageContent); | ||
message.setDestinations(Arrays.asList("94778845713"));//mobile numbers to send the message | ||
message.setSource("ShoutDEMO");//Sender Id | ||
message.setTransports(Arrays.asList(Message.TransportsEnum.SMS));//Type of transport (SMS). More transports will come soon | ||
|
||
MessageResponse response = api.sendMessage(ShoutOUTCustomAuthorizer.getApiKey(), message); | ||
//Do your stuff with the response | ||
System.out.println("Status:" + response.getStatus()); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.squarelabs.shoutout.sdk.sample</groupId> | ||
<artifactId>sdk-sample</artifactId> | ||
<version>1.0</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.squarelabs.shoutout.sdk</groupId> | ||
<artifactId>shoutout-java-sdk</artifactId> | ||
<version>7.0.0</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
6 changes: 3 additions & 3 deletions
6
...e/shoutout/sdk/api/ActivitiesApiTest.java → ...s/shoutout/sdk/api/ActivitiesApiTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ile/shoutout/sdk/api/ContactsApiTest.java → ...abs/shoutout/sdk/api/ContactsApiTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ile/shoutout/sdk/api/MessagesApiTest.java → ...abs/shoutout/sdk/api/MessagesApiTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters