Skip to content

Commit 9fa1eec

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

File tree

5 files changed

+5
-50
lines changed

5 files changed

+5
-50
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public TopicList<Topic> getTopicsList(String groupId, int perPage, int page) thr
5555
TopicList<Topic> topicList = new TopicList<Topic>();
5656
Map<String, Object> parameters = new HashMap<String, Object>();
5757
parameters.put("method", METHOD_TOPICS_GET_LIST);
58-
parameters.put(Flickr.API_KEY, apiKey);
5958

6059
parameters.put("group_id", groupId);
6160

@@ -106,7 +105,6 @@ public TopicList<Topic> getTopicsList(String groupId, int perPage, int page) thr
106105
public Topic getTopicInfo(String topicId) throws FlickrException {
107106
Map<String, Object> parameters = new HashMap<String, Object>();
108107
parameters.put("method", METHOD_TOPICS_GET_INFO);
109-
parameters.put(Flickr.API_KEY, apiKey);
110108
parameters.put("topic_id", topicId);
111109

112110
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
@@ -134,7 +132,6 @@ public ReplyObject getReplyList(String topicId, int perPage, int page) throws F
134132
TopicList<Topic> topic = new TopicList<Topic>();
135133
Map<String, Object> parameters = new HashMap<String, Object>();
136134
parameters.put("method", METHOD_REPLIES_GET_LIST);
137-
parameters.put(Flickr.API_KEY, apiKey);
138135

139136
parameters.put("topic_id", topicId);
140137

@@ -186,7 +183,6 @@ public ReplyObject getReplyList(String topicId, int perPage, int page) throws F
186183
public Reply getReplyInfo(String topicId, String replyId) throws FlickrException {
187184
Map<String, Object> parameters = new HashMap<String, Object>();
188185
parameters.put("method", METHOD_REPLIES_GET_INFO);
189-
parameters.put(Flickr.API_KEY, apiKey);
190186
parameters.put("topic_id", topicId);
191187
parameters.put("reply_id", replyId);
192188

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
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public PhotosetsInterface(String apiKey, String sharedSecret, Transport transpor
8787
public void addPhoto(String photosetId, String photoId) throws FlickrException {
8888
Map<String, Object> parameters = new HashMap<String, Object>();
8989
parameters.put("method", METHOD_ADD_PHOTO);
90-
parameters.put(Flickr.API_KEY, apiKey);
9190

9291
parameters.put("photoset_id", photosetId);
9392
parameters.put("photo_id", photoId);
@@ -113,7 +112,6 @@ public void addPhoto(String photosetId, String photoId) throws FlickrException {
113112
public Photoset create(String title, String description, String primaryPhotoId) throws FlickrException {
114113
Map<String, Object> parameters = new HashMap<String, Object>();
115114
parameters.put("method", METHOD_CREATE);
116-
parameters.put(Flickr.API_KEY, apiKey);
117115

118116
parameters.put("title", title);
119117
parameters.put("description", description);
@@ -140,7 +138,6 @@ public Photoset create(String title, String description, String primaryPhotoId)
140138
public void delete(String photosetId) throws FlickrException {
141139
Map<String, Object> parameters = new HashMap<String, Object>();
142140
parameters.put("method", METHOD_DELETE);
143-
parameters.put(Flickr.API_KEY, apiKey);
144141

145142
parameters.put("photoset_id", photosetId);
146143

@@ -164,7 +161,6 @@ public void delete(String photosetId) throws FlickrException {
164161
public void editMeta(String photosetId, String title, String description) throws FlickrException {
165162
Map<String, Object> parameters = new HashMap<String, Object>();
166163
parameters.put("method", METHOD_EDIT_META);
167-
parameters.put(Flickr.API_KEY, apiKey);
168164

169165
parameters.put("photoset_id", photosetId);
170166
parameters.put("title", title);
@@ -192,7 +188,6 @@ public void editMeta(String photosetId, String title, String description) throws
192188
public void editPhotos(String photosetId, String primaryPhotoId, String[] photoIds) throws FlickrException {
193189
Map<String, Object> parameters = new HashMap<String, Object>();
194190
parameters.put("method", METHOD_EDIT_PHOTOS);
195-
parameters.put(Flickr.API_KEY, apiKey);
196191

197192
parameters.put("photoset_id", photosetId);
198193
parameters.put("primary_photo_id", primaryPhotoId);
@@ -219,7 +214,6 @@ public void editPhotos(String photosetId, String primaryPhotoId, String[] photoI
219214
public PhotoContext getContext(String photoId, String photosetId) throws FlickrException {
220215
Map<String, Object> parameters = new HashMap<String, Object>();
221216
parameters.put("method", METHOD_GET_CONTEXT);
222-
parameters.put(Flickr.API_KEY, apiKey);
223217

224218
parameters.put("photo_id", photoId);
225219
parameters.put("photoset_id", photosetId);
@@ -262,7 +256,6 @@ public PhotoContext getContext(String photoId, String photosetId) throws FlickrE
262256
public Photoset getInfo(String photosetId) throws FlickrException {
263257
Map<String, Object> parameters = new HashMap<String, Object>();
264258
parameters.put("method", METHOD_GET_INFO);
265-
parameters.put(Flickr.API_KEY, apiKey);
266259

267260
parameters.put("photoset_id", photosetId);
268261

@@ -337,7 +330,6 @@ public Photosets getList(String userId) throws FlickrException {
337330
public Photosets getList(String userId, int perPage, int page) throws FlickrException {
338331
Map<String, Object> parameters = new HashMap<String, Object>();
339332
parameters.put("method", METHOD_GET_LIST);
340-
parameters.put(Flickr.API_KEY, apiKey);
341333

342334
if (userId != null) {
343335
parameters.put("user_id", userId);
@@ -420,7 +412,6 @@ public Photosets getList(String userId, int perPage, int page) throws FlickrExce
420412
public int getPhotosetCount(String userId) throws FlickrException {
421413
Map<String, Object> parameters = new HashMap<String, Object>();
422414
parameters.put("method", METHOD_GET_LIST);
423-
parameters.put(Flickr.API_KEY, apiKey);
424415

425416
if (userId != null) {
426417
parameters.put("user_id", userId);
@@ -468,7 +459,6 @@ public PhotoList<Photo> getPhotos(String photosetId, Set<String> extras, int pri
468459
PhotoList<Photo> photos = new PhotoList<Photo>();
469460
Map<String, Object> parameters = new HashMap<String, Object>();
470461
parameters.put("method", METHOD_GET_PHOTOS);
471-
parameters.put(Flickr.API_KEY, apiKey);
472462

473463
parameters.put("photoset_id", photosetId);
474464

@@ -546,8 +536,7 @@ public PhotoList<Photo> getPhotos(String photosetId, int perPage, int page) thro
546536
*/
547537
public void orderSets(String[] photosetIds) throws FlickrException {
548538
Map<String, Object> parameters = new HashMap<String, Object>();
549-
parameters.put("method", METHOD_ORDER_SETS);
550-
parameters.put(Flickr.API_KEY, apiKey);
539+
parameters.put("method", METHOD_ORDER_SETS);;
551540

552541
parameters.put("photoset_ids", StringUtilities.join(photosetIds, ","));
553542

@@ -569,7 +558,6 @@ public void orderSets(String[] photosetIds) throws FlickrException {
569558
public void removePhoto(String photosetId, String photoId) throws FlickrException {
570559
Map<String, Object> parameters = new HashMap<String, Object>();
571560
parameters.put("method", METHOD_REMOVE_PHOTO);
572-
parameters.put(Flickr.API_KEY, apiKey);
573561

574562
parameters.put("photoset_id", photosetId);
575563
parameters.put("photo_id", photoId);
@@ -592,7 +580,6 @@ public void removePhoto(String photosetId, String photoId) throws FlickrExceptio
592580
public void removePhotos(String photosetId, String photoIds) throws FlickrException {
593581
Map<String, Object> parameters = new HashMap<String, Object>();
594582
parameters.put("method", METHOD_REMOVE_PHOTOS);
595-
parameters.put(Flickr.API_KEY, apiKey);
596583

597584
parameters.put("photoset_id", photosetId);
598585
parameters.put("photo_ids", photoIds);
@@ -615,7 +602,6 @@ public void removePhotos(String photosetId, String photoIds) throws FlickrExcept
615602
public void reorderPhotos(String photosetId, String photoIds) throws FlickrException {
616603
Map<String, Object> parameters = new HashMap<String, Object>();
617604
parameters.put("method", METHOD_REORDER_PHOTOS);
618-
parameters.put(Flickr.API_KEY, apiKey);
619605

620606
parameters.put("photoset_id", photosetId);
621607
parameters.put("photo_ids", photoIds);
@@ -638,7 +624,6 @@ public void reorderPhotos(String photosetId, String photoIds) throws FlickrExcep
638624
public void setPrimaryPhoto(String photosetId, String photoId) throws FlickrException {
639625
Map<String, Object> parameters = new HashMap<String, Object>();
640626
parameters.put("method", METHOD_SET_PRIMARY_PHOTO);
641-
parameters.put(Flickr.API_KEY, apiKey);
642627

643628
parameters.put("photoset_id", photosetId);
644629
parameters.put("photo_id", photoId);

0 commit comments

Comments
 (0)