Removed api_key parameter from interface files · JavaLeaks/Flickr4Java@9fa1eec · GitHub
Skip to content

Commit 9fa1eec

Browse files
author
Jonathan Willis
committed
Removed api_key parameter from interface files
1 parent 357dfd0 commit 9fa1eec

5 files changed

Lines changed: 5 additions & 50 deletions

File tree

Flickr4Java/src/main/java/com/flickr4java/flickr/groups/discuss/GroupDiscussInterface.java

Lines changed: 0 additions & 4 deletions

Flickr4Java/src/main/java/com/flickr4java/flickr/people/PeopleInterface.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public PeopleInterface(String apiKey, String sharedSecret, Transport transportAP
8383
public User findByEmail(String email) throws FlickrException {
8484
Map<String, Object> parameters = new HashMap<String, Object>();
8585
parameters.put("method", METHOD_FIND_BY_EMAIL);
86-
parameters.put(Flickr.API_KEY, apiKey);
8786

8887
parameters.put("find_email", email);
8988

@@ -111,8 +110,7 @@ public User findByEmail(String email) throws FlickrException {
111110
public User findByUsername(String username) throws FlickrException {
112111
Map<String, Object> parameters = new HashMap<String, Object>();
113112
parameters.put("method", METHOD_FIND_BY_USERNAME);
114-
parameters.put(Flickr.API_KEY, apiKey);
115-
113+
116114
parameters.put("username", username);
117115

118116
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
@@ -139,8 +137,7 @@ public User findByUsername(String username) throws FlickrException {
139137
public User getInfo(String userId) throws FlickrException {
140138
Map<String, Object> parameters = new HashMap<String, Object>();
141139
parameters.put("method", METHOD_GET_INFO);
142-
parameters.put(Flickr.API_KEY, apiKey);
143-
140+
144141
parameters.put("user_id", userId);
145142

146143
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
@@ -202,7 +199,6 @@ public Collection<Group> getPublicGroups(String userId) throws FlickrException {
202199

203200
Map<String, Object> parameters = new HashMap<String, Object>();
204201
parameters.put("method", METHOD_GET_PUBLIC_GROUPS);
205-
parameters.put(Flickr.API_KEY, apiKey);
206202

207203
parameters.put("user_id", userId);
208204

@@ -250,7 +246,6 @@ public PhotoList<Photo> getPublicPhotos(String userId, Set<String> extras, int p
250246

251247
Map<String, Object> parameters = new HashMap<String, Object>();
252248
parameters.put("method", METHOD_GET_PUBLIC_PHOTOS);
253-
parameters.put(Flickr.API_KEY, apiKey);
254249

255250
parameters.put("user_id", userId);
256251

@@ -294,7 +289,6 @@ public PhotoList<Photo> getPublicPhotos(String userId, Set<String> extras, int p
294289
public User getUploadStatus() throws FlickrException {
295290
Map<String, Object> parameters = new HashMap<String, Object>();
296291
parameters.put("method", METHOD_GET_UPLOAD_STATUS);
297-
parameters.put(Flickr.API_KEY, apiKey);
298292

299293
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
300294
if (response.isError()) {
@@ -334,7 +328,6 @@ public PhotoList<Photo> getPhotos(String userId, String safeSearch, Date minUplo
334328

335329
Map<String, Object> parameters = new HashMap<String, Object>();
336330
parameters.put("method", METHOD_GET_PHOTOS);
337-
parameters.put(Flickr.API_KEY, apiKey);
338331

339332
parameters.put("user_id", userId);
340333
if (safeSearch != null) {
@@ -392,7 +385,6 @@ public PhotoList<Photo> getPhotosOf(String userId, String ownerId, Set<String> e
392385

393386
Map<String, Object> parameters = new HashMap<String, Object>();
394387
parameters.put("method", METHOD_GET_PHOTOS_OF);
395-
parameters.put(Flickr.API_KEY, apiKey);
396388

397389
parameters.put("user_id", userId);
398390
if (ownerId != null) {
@@ -520,7 +512,6 @@ public GroupList<Group> getGroups(String userId) throws FlickrException {
520512
GroupList<Group> groupList = new GroupList<Group>();
521513
Map<String, Object> parameters = new HashMap<String, Object>();
522514
parameters.put("method", METHOD_GET_GROUPS);
523-
parameters.put(Flickr.API_KEY, apiKey);
524515
parameters.put("user_id", userId);
525516

526517
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
@@ -556,7 +547,6 @@ public GroupList<Group> getGroups(String userId) throws FlickrException {
556547
public User getLimits() throws FlickrException {
557548
Map<String, Object> parameters = new HashMap<String, Object>();
558549
parameters.put("method", METHOD_GET_LIMITS);
559-
parameters.put(Flickr.API_KEY, apiKey);
560550

561551
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
562552
if (response.isError()) {

Flickr4Java/src/main/java/com/flickr4java/flickr/photos/suggestions/SuggestionsInterface.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public void removeSuggestion(String suggestionId) throws FlickrException {
6363
private void act(String suggestionId, String method) throws FlickrException {
6464
Map<String, Object> parameters = new HashMap<String, Object>();
6565
parameters.put("method", method);
66-
parameters.put(Flickr.API_KEY, apiKey);
6766
parameters.put("suggestion_id", suggestionId);
6867

6968
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
@@ -75,7 +74,7 @@ private void act(String suggestionId, String method) throws FlickrException {
7574
public void suggestLocation(String photoId, double lat, double lon, int accuracy, String woe_id, String place_id, String note) throws FlickrException {
7675
Map<String, Object> parameters = new HashMap<String, Object>();
7776
parameters.put("method", METHOD_SUGGEST_LOCATION);
78-
parameters.put(Flickr.API_KEY, apiKey);
77+
7978
parameters.put("photo_id", photoId);
8079
parameters.put("lat", lat);
8180
parameters.put("lon", lon);
@@ -102,7 +101,7 @@ public SuggestionList<Suggestion> getList(String photoId) throws FlickrException
102101
SuggestionList<Suggestion> suggestionList = new SuggestionList<Suggestion>();
103102
Map<String, Object> parameters = new HashMap<String, Object>();
104103
parameters.put("method", METHOD_GET_LIST);
105-
parameters.put(Flickr.API_KEY, apiKey);
104+
106105
parameters.put("photo_id", photoId);
107106

108107
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);

Flickr4Java/src/main/java/com/flickr4java/flickr/photosets/PhotosetsInterface.java

Lines changed: 1 addition & 16 deletions

0 commit comments

Comments
 (0)