pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
155 stars 24 forks source link

Add support for basic digital ocean spaces API #138

Closed rpodcast closed 7 years ago

rpodcast commented 7 years ago

Description

This PR brings preliminary support for utilizing the digital ocean spaces object storage API. The spaces API is backward-compatible with the Amazon S3 object storage API, so I leverage key functions from the aws.s3 package to work with the API. Since the authentication is controlled by separate keys from the normal digital ocean API, the user is expected to create these keys within their DO spaces account, and the user can pass the key ID and secret directly in the functions or define them as environment variables (DO_SPACES_ACCESS_KEY and DO_SPACES_SECRET_KEY). The main functions introduced are the following:

Related Issue

136

Example

# obtain the spaces in your DO account
my_spaces <- spaces()

# print summary information of the space called "test-space"
summary(my_spaces[["rpodcast-space3"]])

<space_detail>rpodcast-space3
  Size (GB):     37.54697 
  Files:        17331
  Created at:    2017-08-27T19:01:05.737Z 

# create a new space in your account
space_create("my-new-space")
rpodcast commented 7 years ago

Thanks for your review @sckott! I've added comments above and pushed the updates.

sckott commented 7 years ago
rpodcast commented 7 years ago

I finally got a chance to make updates and address your latest comments. Please take a look and let me know if you see other areas that need revisions.

sckott commented 7 years ago

Looks good @thercast

Let's merge this, then we can go back to #136 and discuss how to divy up tasks