storj-archived / storj-python-sdk

Deprecated. A Python SDK for the Storj API.
https://storj.io
MIT License
23 stars 19 forks source link

Client.file_pointers() where does skip and limit need to be passed #82

Closed steenzout closed 5 years ago

steenzout commented 7 years ago

http_test.py : this is the fix to make the test pass but I need to verify if the extra parameters skip and limit are passed on the HTTP header or JSON structure.

    @mock.patch.object(http.Client, 'token_create')
    def test_file_pointers(self, mock_token_create):
        """Test Client.file_pointers()."""
        test_bucket_id = '1234'
        test_file_id = '5678'

        mock_token_create.return_value = model.Token(token='test_token')

        response = self.client.file_pointers(test_bucket_id, test_file_id)

        assert response is not None
        for pointer in response:
            assert isinstance(pointer, model.FilePointer)

        self.mock_request.assert_called_once_with(
            method='GET',
            path='/buckets/%s/files/%s/' % (test_bucket_id, test_file_id),
            headers={'x-token': None, 'skip': 'None', 'limit': 'None'},
            json={'skip': 'None', 'limit': 'None'})

        mock_token_create.assert_called_once_with(
            test_bucket_id, operation='PULL')

please assign to me.

sibblegp commented 7 years ago

Skip and limit need to be passed in many places, including in downloading files.

RichardLitt commented 5 years ago

👋 Hey! Thanks for this contribution. Apologies for the delay in responding!

We've decided to rearchitect Storj, so that we can scale better. You can read more about this decision here. This means that we are entirely focused on v3 at the moment, in the storj/storj repository. Our white paper for v3 is coming very, very soon - follow along on the blog and in our Rocketchat.

As this repository is part of the v2 network, we're no longer maintaining this repository. I am going to close this for now. If you have any questions, I encourage you to jump on Rocketchat and ask them there. Thanks!