From cc82c1ba42d9c82ff91f5b5dbbcc1610536f29c2 Mon Sep 17 00:00:00 2001 From: Madura <madura@sqrmobile.com> Date: Thu, 14 Jul 2016 13:55:14 +0530 Subject: [PATCH 1/2] updated package + readme to squarelabs --- README.md | 12 ++++++------ pom.xml | 2 +- .../shoutout/sdk/ApiClient.java | 10 +++++----- .../shoutout/sdk/ApiException.java | 2 +- .../shoutout/sdk/Configuration.java | 2 +- .../shoutout/sdk/Pair.java | 2 +- .../shoutout/sdk/StringUtil.java | 2 +- .../shoutout/sdk/api/ActivitiesApi.java | 14 +++++++------- .../shoutout/sdk/api/ContactsApi.java | 14 +++++++------- .../shoutout/sdk/api/MessagesApi.java | 17 ++++++++--------- .../shoutout/sdk/auth/ApiKeyAuth.java | 4 ++-- .../shoutout/sdk/auth/Authentication.java | 4 ++-- .../shoutout/sdk/auth/HttpBasicAuth.java | 4 ++-- .../shoutout/sdk/auth/OAuth.java | 4 ++-- .../shoutout/sdk/auth/OAuthFlow.java | 2 +- .../shoutout/sdk/model/ActivityRecord.java | 2 +- .../shoutout/sdk/model/Contact.java | 2 +- .../shoutout/sdk/model/ContactList.java | 2 +- .../shoutout/sdk/model/Message.java | 2 +- .../shoutout/sdk/model/MessageContent.java | 2 +- .../shoutout/sdk/model/MessageResponse.java | 2 +- .../shoutout/sdk/model/Response.java | 2 +- .../shoutout/sdk/api/ActivitiesApiTest.java | 6 +++--- .../shoutout/sdk/api/ContactsApiTest.java | 8 ++++---- .../shoutout/sdk/api/MessagesApiTest.java | 6 +++--- 25 files changed, 64 insertions(+), 65 deletions(-) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/ApiClient.java (98%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/ApiException.java (98%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/Configuration.java (94%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/Pair.java (95%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/StringUtil.java (97%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/api/ActivitiesApi.java (87%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/api/ContactsApi.java (96%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/api/MessagesApi.java (88%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/auth/ApiKeyAuth.java (93%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/auth/Authentication.java (72%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/auth/HttpBasicAuth.java (92%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/auth/OAuth.java (87%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/auth/OAuthFlow.java (62%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/ActivityRecord.java (98%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/Contact.java (95%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/ContactList.java (98%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/Message.java (98%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/MessageContent.java (97%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/MessageResponse.java (98%) rename src/main/java/com/{squaremobile => squarelabs}/shoutout/sdk/model/Response.java (97%) rename src/test/java/com/{squaremobile => squarelabs}/shoutout/sdk/api/ActivitiesApiTest.java (79%) rename src/test/java/com/{squaremobile => squarelabs}/shoutout/sdk/api/ContactsApiTest.java (90%) rename src/test/java/com/{squaremobile => squarelabs}/shoutout/sdk/api/MessagesApiTest.java (79%) diff --git a/README.md b/README.md index 8165d51..a950c13 100755 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Add this dependency to your project's POM: ```xml <dependency> - <groupId>com.squaremobile.shoutout.sdk</groupId> + <groupId>com.squarelabs.shoutout.sdk</groupId> <artifactId>shoutout-java-sdk</artifactId> <version>7.0.0</version> <scope>compile</scope> @@ -38,7 +38,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.squaremobile.shoutout.sdk:shoutout-java-sdk:7.0.0" +compile "com.squarelabs.shoutout.sdk:shoutout-java-sdk:7.0.0" ``` ### Others @@ -57,10 +57,10 @@ Please follow the [installation](#installation) instruction and execute the foll ```java -import com.squaremobile.shoutout.sdk.*; -import com.squaremobile.shoutout.sdk.auth.*; -import com.squaremobile.shoutout.sdk.model.*; -import com.squaremobile.shoutout.sdk.api.ActivitiesApi; +import com.squarelabs.shoutout.sdk.*; +import com.squarelabs.shoutout.sdk.auth.*; +import com.squarelabs.shoutout.sdk.model.*; +import com.squarelabs.shoutout.sdk.api.ActivitiesApi; import java.io.File; import java.util.*; diff --git a/pom.xml b/pom.xml index be34620..1cbdeb1 100755 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>com.squaremobile.shoutout.sdk</groupId> + <groupId>com.squarelabs.shoutout.sdk</groupId> <artifactId>shoutout-java-sdk</artifactId> <packaging>jar</packaging> <name>ShoutOUT-java-sdk</name> diff --git a/src/main/java/com/squaremobile/shoutout/sdk/ApiClient.java b/src/main/java/com/squarelabs/shoutout/sdk/ApiClient.java similarity index 98% rename from src/main/java/com/squaremobile/shoutout/sdk/ApiClient.java rename to src/main/java/com/squarelabs/shoutout/sdk/ApiClient.java index 26f22b3..c37a8aa 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/ApiClient.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/ApiClient.java @@ -1,14 +1,14 @@ -package com.squaremobile.shoutout.sdk; +package com.squarelabs.shoutout.sdk; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.datatype.joda.*; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; -import com.squaremobile.shoutout.sdk.auth.ApiKeyAuth; -import com.squaremobile.shoutout.sdk.auth.Authentication; -import com.squaremobile.shoutout.sdk.auth.HttpBasicAuth; -import com.squaremobile.shoutout.sdk.auth.OAuth; +import com.squarelabs.shoutout.sdk.auth.ApiKeyAuth; +import com.squarelabs.shoutout.sdk.auth.Authentication; +import com.squarelabs.shoutout.sdk.auth.HttpBasicAuth; +import com.squarelabs.shoutout.sdk.auth.OAuth; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.GenericType; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/ApiException.java b/src/main/java/com/squarelabs/shoutout/sdk/ApiException.java similarity index 98% rename from src/main/java/com/squaremobile/shoutout/sdk/ApiException.java rename to src/main/java/com/squarelabs/shoutout/sdk/ApiException.java index 7e736f6..e75fe4e 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/ApiException.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/ApiException.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk; +package com.squarelabs.shoutout.sdk; import java.util.Map; import java.util.List; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/Configuration.java b/src/main/java/com/squarelabs/shoutout/sdk/Configuration.java similarity index 94% rename from src/main/java/com/squaremobile/shoutout/sdk/Configuration.java rename to src/main/java/com/squarelabs/shoutout/sdk/Configuration.java index 9eee72c..a20c350 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/Configuration.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/Configuration.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk; +package com.squarelabs.shoutout.sdk; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-13T10:36:50.130Z") public class Configuration { diff --git a/src/main/java/com/squaremobile/shoutout/sdk/Pair.java b/src/main/java/com/squarelabs/shoutout/sdk/Pair.java similarity index 95% rename from src/main/java/com/squaremobile/shoutout/sdk/Pair.java rename to src/main/java/com/squarelabs/shoutout/sdk/Pair.java index 730fac4..476f9eb 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/Pair.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/Pair.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk; +package com.squarelabs.shoutout.sdk; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-13T10:36:50.130Z") public class Pair { diff --git a/src/main/java/com/squaremobile/shoutout/sdk/StringUtil.java b/src/main/java/com/squarelabs/shoutout/sdk/StringUtil.java similarity index 97% rename from src/main/java/com/squaremobile/shoutout/sdk/StringUtil.java rename to src/main/java/com/squarelabs/shoutout/sdk/StringUtil.java index 49fabca..07d82a9 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/StringUtil.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/StringUtil.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk; +package com.squarelabs.shoutout.sdk; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-07-13T10:36:50.130Z") public class StringUtil { diff --git a/src/main/java/com/squaremobile/shoutout/sdk/api/ActivitiesApi.java b/src/main/java/com/squarelabs/shoutout/sdk/api/ActivitiesApi.java similarity index 87% rename from src/main/java/com/squaremobile/shoutout/sdk/api/ActivitiesApi.java rename to src/main/java/com/squarelabs/shoutout/sdk/api/ActivitiesApi.java index 81abaca..55dcdd8 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/api/ActivitiesApi.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/api/ActivitiesApi.java @@ -1,14 +1,14 @@ -package com.squaremobile.shoutout.sdk.api; +package com.squarelabs.shoutout.sdk.api; +import com.squarelabs.shoutout.sdk.ApiClient; +import com.squarelabs.shoutout.sdk.Configuration; +import com.squarelabs.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.model.Response; import com.sun.jersey.api.client.GenericType; -import com.squaremobile.shoutout.sdk.ApiException; -import com.squaremobile.shoutout.sdk.ApiClient; -import com.squaremobile.shoutout.sdk.Configuration; -import com.squaremobile.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.ApiException; -import com.squaremobile.shoutout.sdk.model.Response; -import com.squaremobile.shoutout.sdk.model.ActivityRecord; +import com.squarelabs.shoutout.sdk.model.ActivityRecord; import java.util.ArrayList; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/api/ContactsApi.java b/src/main/java/com/squarelabs/shoutout/sdk/api/ContactsApi.java similarity index 96% rename from src/main/java/com/squaremobile/shoutout/sdk/api/ContactsApi.java rename to src/main/java/com/squarelabs/shoutout/sdk/api/ContactsApi.java index a5e8e47..9532efc 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/api/ContactsApi.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/api/ContactsApi.java @@ -1,13 +1,13 @@ -package com.squaremobile.shoutout.sdk.api; +package com.squarelabs.shoutout.sdk.api; -import com.squaremobile.shoutout.sdk.ApiException; -import com.squaremobile.shoutout.sdk.Configuration; -import com.squaremobile.shoutout.sdk.model.Contact; -import com.squaremobile.shoutout.sdk.model.ContactList; +import com.squarelabs.shoutout.sdk.ApiException; +import com.squarelabs.shoutout.sdk.Configuration; +import com.squarelabs.shoutout.sdk.model.Contact; +import com.squarelabs.shoutout.sdk.model.ContactList; import com.sun.jersey.api.client.GenericType; -import com.squaremobile.shoutout.sdk.ApiClient; -import com.squaremobile.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.ApiClient; +import com.squarelabs.shoutout.sdk.Pair; import java.util.ArrayList; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/api/MessagesApi.java b/src/main/java/com/squarelabs/shoutout/sdk/api/MessagesApi.java similarity index 88% rename from src/main/java/com/squaremobile/shoutout/sdk/api/MessagesApi.java rename to src/main/java/com/squarelabs/shoutout/sdk/api/MessagesApi.java index 9b1c635..7578427 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/api/MessagesApi.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/api/MessagesApi.java @@ -1,14 +1,13 @@ -package com.squaremobile.shoutout.sdk.api; - -import com.squaremobile.shoutout.sdk.ApiException; -import com.squaremobile.shoutout.sdk.Configuration; -import com.squaremobile.shoutout.sdk.model.Message; -import com.squaremobile.shoutout.sdk.model.MessageResponse; +package com.squarelabs.shoutout.sdk.api; + +import com.squarelabs.shoutout.sdk.ApiClient; +import com.squarelabs.shoutout.sdk.Configuration; +import com.squarelabs.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.model.Message; +import com.squarelabs.shoutout.sdk.ApiException; +import com.squarelabs.shoutout.sdk.model.MessageResponse; import com.sun.jersey.api.client.GenericType; -import com.squaremobile.shoutout.sdk.ApiClient; -import com.squaremobile.shoutout.sdk.Pair; - import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/auth/ApiKeyAuth.java b/src/main/java/com/squarelabs/shoutout/sdk/auth/ApiKeyAuth.java similarity index 93% rename from src/main/java/com/squaremobile/shoutout/sdk/auth/ApiKeyAuth.java rename to src/main/java/com/squarelabs/shoutout/sdk/auth/ApiKeyAuth.java index 07ce6d2..ffc9932 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/auth/ApiKeyAuth.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/auth/ApiKeyAuth.java @@ -1,6 +1,6 @@ -package com.squaremobile.shoutout.sdk.auth; +package com.squarelabs.shoutout.sdk.auth; -import com.squaremobile.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.Pair; import java.util.Map; import java.util.List; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/auth/Authentication.java b/src/main/java/com/squarelabs/shoutout/sdk/auth/Authentication.java similarity index 72% rename from src/main/java/com/squaremobile/shoutout/sdk/auth/Authentication.java rename to src/main/java/com/squarelabs/shoutout/sdk/auth/Authentication.java index 5e2bd5b..5d340de 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/auth/Authentication.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/auth/Authentication.java @@ -1,6 +1,6 @@ -package com.squaremobile.shoutout.sdk.auth; +package com.squarelabs.shoutout.sdk.auth; -import com.squaremobile.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.Pair; import java.util.Map; import java.util.List; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/auth/HttpBasicAuth.java b/src/main/java/com/squarelabs/shoutout/sdk/auth/HttpBasicAuth.java similarity index 92% rename from src/main/java/com/squaremobile/shoutout/sdk/auth/HttpBasicAuth.java rename to src/main/java/com/squarelabs/shoutout/sdk/auth/HttpBasicAuth.java index 5371c07..cc018c4 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/auth/HttpBasicAuth.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/auth/HttpBasicAuth.java @@ -1,6 +1,6 @@ -package com.squaremobile.shoutout.sdk.auth; +package com.squarelabs.shoutout.sdk.auth; -import com.squaremobile.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.Pair; import com.migcomponents.migbase64.Base64; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/auth/OAuth.java b/src/main/java/com/squarelabs/shoutout/sdk/auth/OAuth.java similarity index 87% rename from src/main/java/com/squaremobile/shoutout/sdk/auth/OAuth.java rename to src/main/java/com/squarelabs/shoutout/sdk/auth/OAuth.java index cbf2e5d..fbb4332 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/auth/OAuth.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/auth/OAuth.java @@ -1,6 +1,6 @@ -package com.squaremobile.shoutout.sdk.auth; +package com.squarelabs.shoutout.sdk.auth; -import com.squaremobile.shoutout.sdk.Pair; +import com.squarelabs.shoutout.sdk.Pair; import java.util.Map; import java.util.List; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/auth/OAuthFlow.java b/src/main/java/com/squarelabs/shoutout/sdk/auth/OAuthFlow.java similarity index 62% rename from src/main/java/com/squaremobile/shoutout/sdk/auth/OAuthFlow.java rename to src/main/java/com/squarelabs/shoutout/sdk/auth/OAuthFlow.java index f2f71a6..1da1868 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/auth/OAuthFlow.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/auth/OAuthFlow.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.auth; +package com.squarelabs.shoutout.sdk.auth; public enum OAuthFlow { accessCode, implicit, password, application diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/ActivityRecord.java b/src/main/java/com/squarelabs/shoutout/sdk/model/ActivityRecord.java similarity index 98% rename from src/main/java/com/squaremobile/shoutout/sdk/model/ActivityRecord.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/ActivityRecord.java index 6d00931..9d76ea8 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/ActivityRecord.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/ActivityRecord.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/Contact.java b/src/main/java/com/squarelabs/shoutout/sdk/model/Contact.java similarity index 95% rename from src/main/java/com/squaremobile/shoutout/sdk/model/Contact.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/Contact.java index 97ea912..d5cb4d4 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/Contact.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/Contact.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Objects; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/ContactList.java b/src/main/java/com/squarelabs/shoutout/sdk/model/ContactList.java similarity index 98% rename from src/main/java/com/squaremobile/shoutout/sdk/model/ContactList.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/ContactList.java index 6a088a1..cd679a5 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/ContactList.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/ContactList.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/Message.java b/src/main/java/com/squarelabs/shoutout/sdk/model/Message.java similarity index 98% rename from src/main/java/com/squaremobile/shoutout/sdk/model/Message.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/Message.java index 0e80ab5..8c8593b 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/Message.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/Message.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Objects; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/MessageContent.java b/src/main/java/com/squarelabs/shoutout/sdk/model/MessageContent.java similarity index 97% rename from src/main/java/com/squaremobile/shoutout/sdk/model/MessageContent.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/MessageContent.java index 91e1a58..056ad0d 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/MessageContent.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/MessageContent.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/MessageResponse.java b/src/main/java/com/squarelabs/shoutout/sdk/model/MessageResponse.java similarity index 98% rename from src/main/java/com/squaremobile/shoutout/sdk/model/MessageResponse.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/MessageResponse.java index a7c0a0a..477e07a 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/MessageResponse.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/MessageResponse.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/squaremobile/shoutout/sdk/model/Response.java b/src/main/java/com/squarelabs/shoutout/sdk/model/Response.java similarity index 97% rename from src/main/java/com/squaremobile/shoutout/sdk/model/Response.java rename to src/main/java/com/squarelabs/shoutout/sdk/model/Response.java index 94f64f5..94e3171 100644 --- a/src/main/java/com/squaremobile/shoutout/sdk/model/Response.java +++ b/src/main/java/com/squarelabs/shoutout/sdk/model/Response.java @@ -1,4 +1,4 @@ -package com.squaremobile.shoutout.sdk.model; +package com.squarelabs.shoutout.sdk.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/test/java/com/squaremobile/shoutout/sdk/api/ActivitiesApiTest.java b/src/test/java/com/squarelabs/shoutout/sdk/api/ActivitiesApiTest.java similarity index 79% rename from src/test/java/com/squaremobile/shoutout/sdk/api/ActivitiesApiTest.java rename to src/test/java/com/squarelabs/shoutout/sdk/api/ActivitiesApiTest.java index 1074013..2e8c1af 100644 --- a/src/test/java/com/squaremobile/shoutout/sdk/api/ActivitiesApiTest.java +++ b/src/test/java/com/squarelabs/shoutout/sdk/api/ActivitiesApiTest.java @@ -1,7 +1,7 @@ -package com.squaremobile.shoutout.sdk.api; +package com.squarelabs.shoutout.sdk.api; -import com.squaremobile.shoutout.sdk.ApiException; -import com.squaremobile.shoutout.sdk.model.ActivityRecord; +import com.squarelabs.shoutout.sdk.ApiException; +import com.squarelabs.shoutout.sdk.model.ActivityRecord; import org.junit.Test; /** diff --git a/src/test/java/com/squaremobile/shoutout/sdk/api/ContactsApiTest.java b/src/test/java/com/squarelabs/shoutout/sdk/api/ContactsApiTest.java similarity index 90% rename from src/test/java/com/squaremobile/shoutout/sdk/api/ContactsApiTest.java rename to src/test/java/com/squarelabs/shoutout/sdk/api/ContactsApiTest.java index 1383dc4..ed9620b 100644 --- a/src/test/java/com/squaremobile/shoutout/sdk/api/ContactsApiTest.java +++ b/src/test/java/com/squarelabs/shoutout/sdk/api/ContactsApiTest.java @@ -1,8 +1,8 @@ -package com.squaremobile.shoutout.sdk.api; +package com.squarelabs.shoutout.sdk.api; -import com.squaremobile.shoutout.sdk.ApiException; -import com.squaremobile.shoutout.sdk.model.Contact; -import com.squaremobile.shoutout.sdk.model.ContactList; +import com.squarelabs.shoutout.sdk.model.ContactList; +import com.squarelabs.shoutout.sdk.ApiException; +import com.squarelabs.shoutout.sdk.model.Contact; import org.junit.Test; /** diff --git a/src/test/java/com/squaremobile/shoutout/sdk/api/MessagesApiTest.java b/src/test/java/com/squarelabs/shoutout/sdk/api/MessagesApiTest.java similarity index 79% rename from src/test/java/com/squaremobile/shoutout/sdk/api/MessagesApiTest.java rename to src/test/java/com/squarelabs/shoutout/sdk/api/MessagesApiTest.java index 0cb2405..6954167 100644 --- a/src/test/java/com/squaremobile/shoutout/sdk/api/MessagesApiTest.java +++ b/src/test/java/com/squarelabs/shoutout/sdk/api/MessagesApiTest.java @@ -1,7 +1,7 @@ -package com.squaremobile.shoutout.sdk.api; +package com.squarelabs.shoutout.sdk.api; -import com.squaremobile.shoutout.sdk.model.Message; -import com.squaremobile.shoutout.sdk.ApiException; +import com.squarelabs.shoutout.sdk.model.Message; +import com.squarelabs.shoutout.sdk.ApiException; import org.junit.Test; /** From 00757c46ca0401439732ae43bd1d391386f524b4 Mon Sep 17 00:00:00 2001 From: Madura <madura@sqrmobile.com> Date: Thu, 14 Jul 2016 15:15:26 +0530 Subject: [PATCH 2/2] Added activity post + message post sample codes --- .../sdk/sample/ActivityRecordPost.java | 62 +++++++++++++++++++ .../shoutout/sdk/sample/MessagePost.java | 44 +++++++++++++ .../squarelabs/shoutout/sdk/sample/pom.xml | 17 +++++ 3 files changed, 123 insertions(+) create mode 100644 src/main/java/com/squarelabs/shoutout/sdk/sample/ActivityRecordPost.java create mode 100644 src/main/java/com/squarelabs/shoutout/sdk/sample/MessagePost.java create mode 100644 src/main/java/com/squarelabs/shoutout/sdk/sample/pom.xml diff --git a/src/main/java/com/squarelabs/shoutout/sdk/sample/ActivityRecordPost.java b/src/main/java/com/squarelabs/shoutout/sdk/sample/ActivityRecordPost.java new file mode 100644 index 0000000..9831624 --- /dev/null +++ b/src/main/java/com/squarelabs/shoutout/sdk/sample/ActivityRecordPost.java @@ -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; + } + } +} diff --git a/src/main/java/com/squarelabs/shoutout/sdk/sample/MessagePost.java b/src/main/java/com/squarelabs/shoutout/sdk/sample/MessagePost.java new file mode 100644 index 0000000..f74d936 --- /dev/null +++ b/src/main/java/com/squarelabs/shoutout/sdk/sample/MessagePost.java @@ -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(); + } + } +} diff --git a/src/main/java/com/squarelabs/shoutout/sdk/sample/pom.xml b/src/main/java/com/squarelabs/shoutout/sdk/sample/pom.xml new file mode 100644 index 0000000..e96249b --- /dev/null +++ b/src/main/java/com/squarelabs/shoutout/sdk/sample/pom.xml @@ -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> \ No newline at end of file