Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2763a0

Browse files
authored
Merge pull request#3 from edmcman/master
Fix two bugs
2 parents21cd4e1 +06d5867 commite2763a0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎R/api.R‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Petfinder <- function(key, secret) {
140140
coat=NULL,
141141
status=NULL,
142142
name=NULL,
143-
organization_id=NULL,
143+
organization=NULL,
144144
location=NULL,
145145
distance=NULL,
146146
sort=NULL,
@@ -180,7 +180,7 @@ Petfinder <- function(key, secret) {
180180
coat=coat,
181181
status=status,
182182
name=name,
183-
organization_id=organization_id,
183+
organization=organization,
184184
location=location,
185185
distance=distance,
186186
sort=sort,
@@ -221,7 +221,8 @@ Petfinder <- function(key, secret) {
221221
r<-private$get_request(url=url,
222222
params=params)
223223

224-
req_json<-jsonlite::fromJSON(httr::content(r,as='text',encoding='utf-8'))
224+
req_json<-jsonlite::fromJSON(httr::content(r,as='text',encoding='utf-8'),
225+
flatten=TRUE)
225226

226227
animals_list[[paste0('page', as.character(1),sep='')]]<-req_json$animals
227228

@@ -456,7 +457,7 @@ Petfinder <- function(key, secret) {
456457
name=NULL,
457458
age=NULL,
458459
animal_id=NULL,
459-
organization_id=NULL,
460+
organization=NULL,
460461
status=NULL,
461462
results_per_page=NULL,
462463
page=NULL) {
@@ -476,7 +477,7 @@ Petfinder <- function(key, secret) {
476477
'name'=name,
477478
'age'=age,
478479
'animal_id'=animal_id,
479-
'organization_id'=organization_id,
480+
'organization'=organization,
480481
'status'=status,
481482
'limit'=results_per_page,
482483
'page'=page

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp