-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* android uploader start * android uploader start * remove secret, proper sig calculation * remove secret, proper sig calculation * cleanup * cleanup * rename * rename * update readme and comments * comments * fix spelling & comment out upload example
- Loading branch information
kj13ennett
authored
Sep 27, 2019
1 parent
56fcdea
commit f7213f3
Showing
7 changed files
with
286 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -70,6 +70,24 @@ Each successive call of `loadNextPageOfPhotos` will load the next page of photos | |
|
||
Once an album has loaded photos from the server, it will instantiate `PXLPhoto` objects that can be consumed by your UI. `PXLPhoto` exposes all of the data for a photo available through the Pixlee API and offers several image url sizes depending on your needs. | ||
|
||
#### Uploading Photos | ||
|
||
If you wish to build your application with photo uploading capabilities, you must initialize the `PXLClient` with an additional parameter - your Pixlee secret key. You must set the secret key along with the API key when you call the static method initialize: | ||
|
||
``` | ||
#!java | ||
PXLClient.initialize(<API KEY>, <SECRET KEY>); | ||
``` | ||
|
||
Now wen you want to upload a photo in your application, simply call the `uploadImage` method of the PXLAlbum object you are using. This would look something like this: | ||
|
||
``` | ||
#!java | ||
album.uploadImage("test", "[email protected]", "testuser", "https://timedotcom.files.wordpress.com/2019/05/drake-nba-finals-warning.jpg", true); | ||
``` | ||
|
||
### Analytics | ||
#### Opened Widget | ||
To fire an opened widget event, simply call the `openedWidget` method of the PXLAlbum or PXLPdpAlbum AFTER data has been returned from the first call of the `loadNextPageOfPhotos` method, and an "Opened Widget" event will be fired containing all of the necessary analytics information. | ||
|
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 |
---|---|---|
|
@@ -176,7 +176,9 @@ public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { | |
*/ | ||
private void createAlbum() { | ||
Context c = this.getApplicationContext(); | ||
|
||
PXLClient.initialize("196i8ZzIAhKU8dO2kDe"); | ||
|
||
album = new PXLAlbum("4503434", c); | ||
PXLAlbumFilterOptions fo = new PXLAlbumFilterOptions(); | ||
fo.minTwitterFollowers = 0; | ||
|
@@ -239,6 +241,11 @@ private void createAlbum() { | |
PXLAlbum.RequestHandlers rh = this; | ||
album.loadNextPageOfPhotos(rh); | ||
|
||
/* ~~~ content upload example ~~~ | ||
album.uploadImage("test", "[email protected]", "K.B.", "https://timedotcom.files.wordpress.com/2019/05/drake-nba-finals-warning.jpg", true); | ||
*/ | ||
} | ||
|
||
/*** | ||
|
@@ -303,6 +310,7 @@ private void updateDetailView(PXLPhoto photo) { | |
pixleeAnalytics.conversion(cartContents, "123", 4); | ||
*/ | ||
|
||
|
||
this.populateDetailActions(photo); | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu May 16 17:06:08 EDT 2019 | ||
#Wed Sep 25 12:41:34 EDT 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip |
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