You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2016/10/19 20:15:19 UTC
[3/6] incubator-streams git commit: update documentation on running
providers stand-alone
update documentation on running providers stand-alone
Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/59c5c797
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/59c5c797
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/59c5c797
Branch: refs/heads/master
Commit: 59c5c797c25caee6d4bbee279e9506072d9ed837
Parents: 73768ba
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Authored: Wed Oct 12 17:36:32 2016 -0500
Committer: Steve Blackmon @steveblackmon <sb...@apache.org>
Committed: Wed Oct 12 17:36:32 2016 -0500
----------------------------------------------------------------------
.../InstagramRecentMediaProvider.java | 14 ++++++++++
.../userinfo/InstagramUserInfoProvider.java | 14 ++++++++++
.../src/site/markdown/index.md | 27 ++++++++++++++++++++
3 files changed, 55 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/59c5c797/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/recentmedia/InstagramRecentMediaProvider.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/recentmedia/InstagramRecentMediaProvider.java b/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/recentmedia/InstagramRecentMediaProvider.java
index 4855ae8..eda9b4a 100644
--- a/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/recentmedia/InstagramRecentMediaProvider.java
+++ b/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/recentmedia/InstagramRecentMediaProvider.java
@@ -60,6 +60,20 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
* Instagram {@link org.apache.streams.core.StreamsProvider} that provides the recent media data for a group of users
+ *
+ * Retrieve recent posts from a list of user ids or names.
+ *
+ * To use from command line:
+ *
+ * Supply (at least) the following required configuration in application.conf:
+ *
+ * instagram.clientKey
+ * instagram.usersInfo.authorizedTokens
+ * instagram.usersInfo.users
+ *
+ * Launch using:
+ *
+ * mvn exec:java -Dexec.mainClass=org.apache.streams.instagram.provider.recentmedia.InstagramRecentMediaProvider -Dexec.args="application.conf media.json"
*/
public class InstagramRecentMediaProvider extends InstagramAbstractProvider {
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/59c5c797/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/userinfo/InstagramUserInfoProvider.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/userinfo/InstagramUserInfoProvider.java b/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/userinfo/InstagramUserInfoProvider.java
index 391b31c..0a47944 100644
--- a/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/userinfo/InstagramUserInfoProvider.java
+++ b/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/provider/userinfo/InstagramUserInfoProvider.java
@@ -44,6 +44,20 @@ import java.util.concurrent.TimeUnit;
/**
* Instagram provider that pulls UserInfoData from Instagram
* @see org.apache.streams.instagram.provider.InstagramAbstractProvider
+ *
+ * Retrieve latest user details from a list of user ids or names.
+ *
+ * To use from command line:
+ *
+ * Supply (at least) the following required configuration in application.conf:
+ *
+ * instagram.clientKey
+ * instagram.usersInfo.authorizedTokens
+ * instagram.usersInfo.users
+ *
+ * Launch using:
+ *
+ * mvn exec:java -Dexec.mainClass=org.apache.streams.instagram.provider.userinfo.InstagramUserInfoProvider -Dexec.args="application.conf userinfo.json"
*/
public class InstagramUserInfoProvider extends InstagramAbstractProvider {
http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/59c5c797/streams-contrib/streams-provider-instagram/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-instagram/src/site/markdown/index.md b/streams-contrib/streams-provider-instagram/src/site/markdown/index.md
index 487d7f3..5cb60b0 100644
--- a/streams-contrib/streams-provider-instagram/src/site/markdown/index.md
+++ b/streams-contrib/streams-provider-instagram/src/site/markdown/index.md
@@ -18,6 +18,33 @@ This module relies on classes from com.sachinhandiekar:jInstagram

+Test:
+-----
+
+Create a local file `instagram.conf` with valid instagram credentials
+
+ instagram {
+ clientId = "b389fcbeca2a40a89afa591a8468e4dc"
+ usersInfo = {
+ authorizedTokens = [
+ "1646021441.b739937.58d5b84abce74241b640d8c1f7e91222"
+ ]
+ }
+ }
+
+Build with integration testing enabled, using your credentials
+
+ mvn clean test verify -DskipITs=false -DargLine="-Dconfig.file=`pwd`/instagram.conf"
+
+If you only have sandbox credentials, you'll have to edit src/test/resources/*IT.conf to pull ids that have been authorized on your sandbox.
+
+Resources:
+----------
+
+[https://elfsight.com/blog/2016/05/how-to-get-instagram-access-token/](https://elfsight.com/blog/2016/05/how-to-get-instagram-access-token/ "https://elfsight.com/blog/2016/05/how-to-get-instagram-access-token/")
+
+[https://smashballoon.com/instagram-feed/find-instagram-user-id/](https://smashballoon.com/instagram-feed/find-instagram-user-id/ "https://smashballoon.com/instagram-feed/find-instagram-user-id/")
+
[JavaDocs](apidocs/index.html "JavaDocs")
###### Licensed under Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0