Code Monkey home page Code Monkey logo

backblaze-b2's People

Contributors

acidburn23 avatar eliranmoyal avatar ghost93 avatar hermogenesbatista avatar hmhrex avatar mtingers avatar snorrelo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

backblaze-b2's Issues

Bucket details missing on delete_file_version()

Hi,

When I call delete_file_version(file_name,file_id) an error is thrown:

file_info = b2_client.get_file_info_by_name(file_name=file_name, bucket_name=my_bucket)
response = b2_client.delete_file_version(file_name=file_info['fileName'], file_id=file_info['fileId'])
print response

The error:

File "/home/shmuel/workspace/***/***/my_script.py", line 135, in foo
    client.remove_file(location)
  File "/home/shmuel/workspace/***/***/b2/B2Client.py", line 29, in remove_file
    response = b2_client.delete_file_version(file_name=file_info['fileName'], file_id=file_info['fileId'])
  File "/usr/local/lib/python2.7/dist-packages/backblazeb2/backblazeb2.py", line 357, in delete_file_version
    bucket = self.get_bucket_info(bucket_id=bucket_id,
NameError: global name 'bucket_id' is not defined

Seems like bucket details are not passed to this function.

I think I can fix that, but in the meantime I'm opening this issue.

MaxFileCount in List_file_versions

At present, the list_filr_versions returns first 100 files I tried the following thing to get more files in single call
def list_file_versions(self, bucket_id=None, bucket_name=None, max_file_account=None): bucket = self.get_bucket_info(bucket_id=bucket_id, bucket_name=bucket_name) self._authorize_account() return self._api_request( '%s/b2api/v1/b2_list_file_versions' % self.api_url, {'bucketId': bucket['bucketId'], 'maxFileCount': max_file_account}, {'Authorization': self.authorization_token})
When passing the following command:
file_names = b2.list_file_versions(bucket_name='abc', max_file_account='20')

It returns the error HTTP Error 400: Bad request. I was wondering if there a way to pass more parameters it the Http message body?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.