Skip to contents

Download JSON response from API

Usage

gtl_dwnl_api_json(call)

Arguments

call

An API url

Value

JSON body

Examples

gtl_dwnl_api_json("https://dummyjson.com/products/1")
#> $id
#> [1] 1
#> 
#> $title
#> [1] "Essence Mascara Lash Princess"
#> 
#> $description
#> [1] "The Essence Mascara Lash Princess is a popular mascara known for its volumizing and lengthening effects. Achieve dramatic lashes with this long-lasting and cruelty-free formula."
#> 
#> $category
#> [1] "beauty"
#> 
#> $price
#> [1] 9.99
#> 
#> $discountPercentage
#> [1] 7.17
#> 
#> $rating
#> [1] 4.94
#> 
#> $stock
#> [1] 5
#> 
#> $tags
#> $tags[[1]]
#> [1] "beauty"
#> 
#> $tags[[2]]
#> [1] "mascara"
#> 
#> 
#> $brand
#> [1] "Essence"
#> 
#> $sku
#> [1] "RCH45Q1A"
#> 
#> $weight
#> [1] 2
#> 
#> $dimensions
#> $dimensions$width
#> [1] 23.17
#> 
#> $dimensions$height
#> [1] 14.43
#> 
#> $dimensions$depth
#> [1] 28.01
#> 
#> 
#> $warrantyInformation
#> [1] "1 month warranty"
#> 
#> $shippingInformation
#> [1] "Ships in 1 month"
#> 
#> $availabilityStatus
#> [1] "Low Stock"
#> 
#> $reviews
#> $reviews[[1]]
#> $reviews[[1]]$rating
#> [1] 2
#> 
#> $reviews[[1]]$comment
#> [1] "Very unhappy with my purchase!"
#> 
#> $reviews[[1]]$date
#> [1] "2024-05-23T08:56:21.618Z"
#> 
#> $reviews[[1]]$reviewerName
#> [1] "John Doe"
#> 
#> $reviews[[1]]$reviewerEmail
#> [1] "john.doe@x.dummyjson.com"
#> 
#> 
#> $reviews[[2]]
#> $reviews[[2]]$rating
#> [1] 2
#> 
#> $reviews[[2]]$comment
#> [1] "Not as described!"
#> 
#> $reviews[[2]]$date
#> [1] "2024-05-23T08:56:21.618Z"
#> 
#> $reviews[[2]]$reviewerName
#> [1] "Nolan Gonzalez"
#> 
#> $reviews[[2]]$reviewerEmail
#> [1] "nolan.gonzalez@x.dummyjson.com"
#> 
#> 
#> $reviews[[3]]
#> $reviews[[3]]$rating
#> [1] 5
#> 
#> $reviews[[3]]$comment
#> [1] "Very satisfied!"
#> 
#> $reviews[[3]]$date
#> [1] "2024-05-23T08:56:21.618Z"
#> 
#> $reviews[[3]]$reviewerName
#> [1] "Scarlett Wright"
#> 
#> $reviews[[3]]$reviewerEmail
#> [1] "scarlett.wright@x.dummyjson.com"
#> 
#> 
#> 
#> $returnPolicy
#> [1] "30 days return policy"
#> 
#> $minimumOrderQuantity
#> [1] 24
#> 
#> $meta
#> $meta$createdAt
#> [1] "2024-05-23T08:56:21.618Z"
#> 
#> $meta$updatedAt
#> [1] "2024-05-23T08:56:21.618Z"
#> 
#> $meta$barcode
#> [1] "9164035109868"
#> 
#> $meta$qrCode
#> [1] "https://assets.dummyjson.com/public/qr-code.png"
#> 
#> 
#> $images
#> $images[[1]]
#> [1] "https://cdn.dummyjson.com/products/images/beauty/Essence%20Mascara%20Lash%20Princess/1.png"
#> 
#> 
#> $thumbnail
#> [1] "https://cdn.dummyjson.com/products/images/beauty/Essence%20Mascara%20Lash%20Princess/thumbnail.png"
#>