Skip to content

Commit

Permalink
Merge branch 'develop' which has Notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcobb committed Mar 16, 2015
2 parents 77dfb26 + 29b1351 commit 9b88dc8
Show file tree
Hide file tree
Showing 219 changed files with 14,182 additions and 3,182 deletions.
2 changes: 1 addition & 1 deletion sdk/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<property name="doc.root" value="../packaged.docs" />

<property name="sdk.version.major" value="04"/>
<property name="sdk.version.minor" value="02"/>
<property name="sdk.version.minor" value="03"/>
<property name="sdk.root.folder" value="ATT_APIPLATFORM_HTML5SDK-R${sdk.version.major}.${sdk.version.minor}"/>
<property name="output" value="${zip.root}/${sdk.root.folder}" />
<property name="doc.output" value="${doc.root}/docs" />
Expand Down
483 changes: 324 additions & 159 deletions sdk/client/att-api-client.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sdk/doc_src/class-categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"AttApiClient.DeviceCapabilities",
"AttApiClient.InAppMessaging",
"AttApiClient.MMS",
"AttApiClient.Notification",
"AttApiClient.OAuth",
"AttApiClient.SMS",
"AttApiClient.Speech",
Expand Down
43 changes: 23 additions & 20 deletions sdk/doc_src/guides/getting_started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ For details on using the Device Capabilities, MMS, In-App Messaging, OAuth, SMS,

- [AT&T API Platform](https://developer.att.com/).

**Note:** To use the AT&T API Platform SDK to build an application, you must obtain an API key set for each application intended to utilize the [AT&T API Platform](https://developer.att.com/docs). If you choose to utilize the SMS or MMS APIs, the AT&T Developer Program will provide short codes (virtual phone numbers) to associate with your application.
**Note:** To use the AT&T API Platform SDK to build an app, you must obtain an API key set for each app in which you intend to utilize the [AT&T API Platform](https://developer.att.com/docs). If you wish to use the SMS or MMS APIs, the AT&T Developer Program will provide short codes (virtual phone numbers) to associate with your app.

Overview
---

The AT&T API Platform SDK for HTML5 has three main layers: Client/Browser, HTML5 SDK Server, and AT&T API Platform:

**Client/Browser** Contains your app code; this layer is for end-user interaction. The AT&T SDK for HTML5 uses a JavaScript library (att-api-client.js) to enable development of cross-platform mobile web apps.
**Client/Browser** Contains your app code; this layer is for user interaction. The AT&T SDK for HTML5 uses a JavaScript library (att-api-client.js) to enable development of cross-platform mobile Web apps.

**HTML5 SDK Server** Provides reusable and extendable server code written in Java, PHP, and Ruby. The HTML5 SDK Server takes requests from the AttApiClient object and sends them to the AT&T API Platform.

Expand All @@ -24,58 +24,61 @@ The AT&T API Platform SDK for HTML5 has three main layers: Client/Browser, HTML5
About the Guides
---

These guides are for intermediate to advanced web application developers who have a good understanding of HTML, JavaScript, and related browser and server technologies. Server implementations of the SDK are provided in Java, Ruby, and PHP. You should be familiar with installing, configuring and developing applications in the language of your choice.
These guides are for intermediate to advanced Web app developers who have a good understanding of HTML, JavaScript, and related browser and server technologies. Server implementations of the SDK are provided in Java, Ruby, and PHP. You should be familiar with installing, configuring and developing apps in the language of your choice.

JavaScript is the language used for all of the client-side code in the AT&T API Platform SDK for HTML5. All samples use the Sencha Touch SDK. These guides are designed to get an application up and running, and to make calls to the AT&T APIs. To customize the behavior of a Sencha Touch based application, you should become familiar with the Sencha Touch SDK. To gain a better understanding of Sencha Touch, visit the [Sencha Learn](http://www.sencha.com/) for in-depth tutorials and API documentation.
JavaScript is the language used for all of the client-side code in the AT&T API Platform SDK for HTML5. All samples use the Sencha Touch SDK. These guides are designed to get an app up and running, and to make calls to the AT&T APIs. To customize the behavior of a Sencha Touch-based app, you should become familiar with the Sencha Touch SDK. To gain a better understanding of Sencha Touch, visit [Sencha Learn](http://www.sencha.com/) for in-depth tutorials and API documentation.

If you want to write HTML5 applications without using Sencha Touch, you can use the provided JavaScript library (att-api-client.js) to utilize AT&T APIs in a library-neutral way.
If you want to write HTML5 apps without using Sencha Touch, you can use the provided JavaScript library (att-api-client.js) to utilize AT&T APIs in a library-neutral way.

**You will need a WebKit-based browser to run the sample code. Desktop WebKit browsers include Google Chrome and Apple Safari. Supported mobile devices include Android and iOS. **


Creating an AT&T Developer Account
---

In order to access the AT&T API Platform, you must first join the [AT&T Developer Program](https://developer.att.com) by creating an account. Once your account is created and validated, and you have followed the instructions on the AT&T Developer Program site to get access to the AT&T API Platform, you will be ready to set up an application within your AT&T Developer account.
In order to access the AT&T API Platform, you must first join the [AT&T Developer Program](https://developer.att.com) by creating an account. Once your account is created and validated and you have followed the instructions on the AT&T Developer Program site to get access to the AT&T API Platform, you will be ready to set up an app within your AT&T Developer account.


Setting Up Your Application
Setting Up Your App
----

1. Log in to the AT&T Developer Program [website](https://developer.att.com) and click the My Apps button.
2. Click Set Up New App, complete the required fields and select the APIs you wish to enable.
3. Click Submit App. Take note of the keys generated for your application setup.
These values are used to configure the server software for authentication when it communicates with the AT&T APIs. The short code is used as the address from which your application sends messages, and as the destination address for your application to process incoming messages.
5. Check all of the AT&T service APIs, including but not limited to: Multimedia Messaging Service (MMS), Short Messaging Service (SMS), and Speech to Text (SPEECH). As you create your application, you should enable all of these services.
1. Log in to the [AT&T Developer Program website](https://developer.att.com) and click the My Apps button.
2. Click Set Up New App, complete the required fields, and select the APIs you wish to enable.
3. Click Submit App. Take note of the App Key and App Secret generated for your app setup.
These values are used to configure the server software for authentication when communicating with the AT&T APIs. The short code is used as the address from which your application sends messages, and as the destination address for your application to process incoming messages.
5. Select all of the AT&T APIs to enable them for your app. As you create your app you will be able to integrate only the APIs you want to use.


OAuth Redirect URL
---

An OAuth Redirect URL is required for all applications using Device Capabilities, and In-App Messaging APIs. The OAuth Redirect URL is the URL to your application, where the user is redirected once the user consent process is completed. When the application attempts an OAuth authentication, AT&T servers verify that the passed callback matches the one provisioned for your application.
An OAuth Redirect URL is required for all apps using the Device Capabilities and In-App Messaging APIs. The OAuth Redirect URL is the URL to your application, where the user is redirected once the user consent process is completed. When the app attempts an OAuth authentication, AT&T servers verify that the passed callback matches the one provisioned for your app.

After authentication, the AT&T API redirects the user back to http://yourhost:yourport/att/callback, yourhost:yourport will need to match exactly with the yourhost:yourport from which the application was loaded.
After authentication, the AT&T API redirects the user back to http://yourhost:yourport/att/callback, yourhost:yourport will need to match exactly with the yourhost:yourport from which the app was loaded.

For example, if your application is hosted on mynewapp.com, and the user loads mynewapp.com, then your redirect URL should be http://mynewapp.com/att/callback .
For example, if your app is hosted on mynewapp.com, and the user loads mynewapp.com, then your redirect URL should be http://mynewapp.com/att/callback .

In these examples and guides, we assume that you are using a 127.0.0.1 host (often used for a local development server). However, any valid DNS name will work. If you plan to test the client from a different computer or on a mobile device, using 127.0.0.1 will not work. In that case you should use a real DNS name that maps to your server.
In these examples and guides, we assume that you are using a host address of 127.0.0.1 (often used for a local development server). However, any valid DNS name will work. If you plan to test the client from a different computer or on a mobile device, using 127.0.0.1 will not work. In that case you should use a real DNS name that maps to your server.

Once your application is provisioned with the AT&T Developer Program, you can proceed with configuring the HTML SDK server.

Notifications Callback URL
---
You can use a Webhooks callback URL to receive notifications of changes to your In-App Messaging message box. After initial app setup on the [AT&T Developer Program website](https://developer.att.com), edit the app and click Push Notifications. Enter the Notification Callback URL for your server at https://yourdomain:yoursslport/att/notification/v1/callback.

HTML5 SDK Server
----

The AT&T API Platform SDK for HTML5 provides examples to address cross domain access and other security concerns. The SDK Server provides a proxy between the web application and the AT&T APIs. It also provides appropriate methods to request the OAuth login sequence, fetch an access token, and make requests to the AT&T APIs.
The AT&T API Platform SDK for HTML5 provides examples to address cross-domain access and other security concerns. The SDK Server provides a proxy between the Web app and the AT&T APIs. It also provides appropriate methods for requesting the OAuth login sequence, fetching an access token, and making requests to the AT&T APIs.

The HTML5 SDK Server layer has been implemented in three popular languages: Java, Ruby, and PHP.

The implementation in each language provides a consistent HTTP API for Client access. The HTTP API allows clients to connect to any of the server implementations without modification.
The implementation in each language provides a consistent HTTP API for client access. The HTTP API allows clients to connect to any of the server implementations without modification.

The HTML5 SDK Server proxy is designed to run with a minimum number of external dependencies, to make integration into your specific environment more convenient. However, depending on the language and development tools used in your environment, modifications may be required to the provided proxy code.
The HTML5 SDK server proxy is designed to run with a minimum number of external dependencies, making integration into your specific environment more convenient. However, depending on the language and development tools used in your environment, modifications may be required to the provided proxy code.


Quick Start
---

To get started, choose the server guide for the language of your choice from the menu on the left. The guide will walk you through the process of configuring, building, and running a web application that uses the AT&T API Platform.
To get started, choose the server guide for the language of your choice from the menu on the left. The guide will walk you through the process of configuring, building, and running a Web app that uses the AT&T API Platform.
16 changes: 9 additions & 7 deletions sdk/doc_src/guides/sample_app_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ The following section describes how to test your connection to the AT&T APIs usi


##OAuth
Device Capabilities and In-App Messaging require users to authorize your app via an OAuth consent. The SDK facilitates this process by presenting the user with the AT&T API Platform access page, capturing their authorization code, requesting and storing the user’s access token. The user needs to authorize consent only once per session.
Device Capabilities and In-App Messaging require users to authorize your app using OAuth consent. The SDK facilitates this process by presenting the user with the AT&T API Platform access page, capturing their authorization code, requesting and storing the user’s access token. The user needs to authorize consent only once per session.

A user accessing In-App Messaging features will be presented with a Consent Request screen requesting app authorization to an AT&T wireless number or account. Device Capabilities uses OAuth authentication but it will not show a consent screen. The authorization is performed automatically if you are on the AT&T network.
A user accessing In-App Messaging features will be presented with a Consent Request screen requesting app authorization to an AT&T wireless number or account. Device Capabilities uses OAuth authentication but it will not show a consent screen. The authorization is performed automatically if you are on the AT&T network.

(**) The authentication pages shown below are from AT&T servers, not the SDK. The UI may be updated and slightly different from the screenshots below.
(**) The following authentication pages are from AT&T servers, not the SDK. The UI may be updated and appear differently than these examples.

There are several authentication methods you may use, but the easiest and fastest method is using an AT&T device with an active wireless number, and send an authorization password to AT&T’s short code:
There are several authentication methods you can use, but the easiest and fastest method is using an AT&T device with an active wireless number to send an authorization password to the AT&T short code:

![Oauth](/sdk/doc_src/resources/images/sample_apps_screens/oauth-one.png)
![Oauth](resources/images/sample_apps_screens/oauth-one.png)

When the correct password is received, you will see a screen like the following indicating that you have authorized the request:

![Oauth](/sdk/doc_src/resources/images/sample_apps_screens/oauth-close.png)
![Oauth](resources/images/sample_apps_screens/oauth-close.png)

Make sure to select "Close window" to redirect the user back to your app and deliver the OAuth token to the server.

Expand Down Expand Up @@ -157,7 +157,9 @@ You can specify up to 10 addresses by separating them with commas. Valid address
* Email Addresses
* Short Codes

You can send a message up to 10 different addresses.
You can send a message to up to 10 different addresses.

In-App Messaging notifications will be received by the app server at https://your_app_server_domain_name:4568/att/notification/v1/callback.

##Advertising
Point your browser to this address:
Expand Down
2 changes: 1 addition & 1 deletion sdk/package.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sdk.version.major=04
sdk.version.minor=02
sdk.version.minor=03

16 changes: 5 additions & 11 deletions sdk/server/java/codekit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@
</configuration>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration></configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration></configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -125,9 +119,9 @@
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.metaparadigm</groupId>
<artifactId>json-rpc</artifactId>
<version>1.0</version>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20140107</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Loading

0 comments on commit 9b88dc8

Please sign in to comment.