Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing white space

  • Loading branch information...
commit 9c882223b33caf926e6956a56b744e5149972562 1 parent b70e619
@SidneyAllen authored
View
8 java/pom.xml
@@ -44,10 +44,10 @@
<version>1.6</version>
</dependency>
<dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- <version>1.1.1</version>
- </dependency>
+ <groupId>com.googlecode.json-simple</groupId>
+ <artifactId>json-simple</artifactId>
+ <version>1.1.1</version>
+ </dependency>
</dependencies>
<build>
View
11 java/src/main/assembly/distribution.xml
@@ -6,7 +6,7 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
- <outputDirectory>/</outputDirectory>
+ <outputDirectory>../</outputDirectory>
</fileSet>
</fileSets>
<dependencySets>
@@ -14,15 +14,6 @@
<outputDirectory>/</outputDirectory>
<unpack>true</unpack>
<scope>runtime</scope>
- <excludes>
- <exclude>junit:junit</exclude>
- <exclude>commons-lang:commons-lang</exclude>
- <exclude>commons-logging:commons-logging</exclude>
- <exclude>commons-cli:commons-cli</exclude>
- <exclude>jsch:jsch</exclude>
- <exclude>org.apache.maven.wagon:wagon-ssh</exclude>
- <exclude>plexus:plexus-container-default</exclude>
- </excludes>
</dependencySet>
</dependencySets>
</assembly>
View
12 java/src/main/java/com/stackmob/example/SendGrid.java
@@ -82,36 +82,30 @@ public ResponseToProcess execute(ProcessedAPIRequest request, SDKServiceProvider
String from = "";
String to = "";
String toname = "";
-
String body = "";
String url = "";
-
String api_user = API_USER;
String api_key = API_KEY;
LoggerService logger = serviceProvider.getLoggerService(SendGrid.class);
-
//Log the JSON object passed to the StackMob Logs
logger.debug(request.getBody());
JSONParser parser = new JSONParser();
-
try {
-
Object obj = parser.parse(request.getBody());
JSONObject jsonObject = (JSONObject) obj;
-
//We use the username passed to query the StackMob datastore
//and retrieve the user's name and email address
username = (String) jsonObject.get("username");
-
// The following values could be static or dynamic
subject = (String) jsonObject.get("subject");
text = (String) jsonObject.get("text");
from = (String) jsonObject.get("from");
-
} catch (ParseException e) {
- e.printStackTrace();
+ logger.error(e.getMessage(), e);
+ responseCode = -1;
+ responseBody = e.getMessage();
}
if (username == null || username.isEmpty()) {
View
4 java/src/main/java/com/stackmob/example/TwilioSMS.java
@@ -46,8 +46,8 @@
//Create your Twilio Acct at twilio.com and enter
//Your accountsid and accesstoken below.
- static String accountsid = "ACda54cd4d640564dc517b7001bb8934a8";
- static String accesstoken = "49dcd6ce57c0a6fdfbad23093136b960";
+ static String accountsid = "YOUR_ACCOUNTSID";
+ static String accesstoken = "YOUR_ACCESSTOKEN";
@Override
public String getMethodName() {
Please sign in to comment.
Something went wrong with that request. Please try again.