Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Transfer requests #99

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Transfer requests #99

wants to merge 8 commits into from

Conversation

jasmingacic
Copy link

@jasmingacic jasmingacic commented Jul 26, 2018

I started working on this and I've got a question about it.

TransferProject function is under "TransferRequestsService" I'm wondering if it would better fit under ProjectService?

@t0mk What do you think?


This change is Reviewable

@jasmingacic
Copy link
Author

While testing I've found an issue here.
According to documentation POST projects/{id}/transfers should be returning transfer request
image

But in reality it returns nothing and a different status code from what is documented:

2018/07/30 10:04:13
=======[REQUEST]=============
POST /projects/8a329eeb-718b-4e58-a736-127ba5f06ed0/transfers HTTP/1.1
Host: api.packet.net
User-Agent: packngo/0.1.0
Connection: close
Content-Length: 66
Accept: application/json
Content-Type: application/json
X-Auth-Token: [token]
X-Consumer-Token: packngo test
Accept-Encoding: gzip

{"target_organization_id":"acfc828a-90ee-4e0a-8216-596f43117aef"}

2018/07/30 10:04:18
=======[RESPONSE]============
HTTP/2.0 200 OK
Connection: close
Accept-Ranges: bytes
Cache-Control: no-cache
Content-Type: application/json
Date: Mon, 30 Jul 2018 08:04:18 GMT
Status: 200 OK
Vary: Origin
Via: 1.1 varnish
X-Cache: MISS
X-Cache-Hits: 0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: d5347329-9804-4d50-826b-6a12e23181c1
X-Served-By: cache-fra19150-FRA
X-Timer: S1532937854.103850,VS0,VE4222
X-Xss-Protection: 1; mode=block

@jasmingacic jasmingacic changed the title [WIP] Initial commit for transfer requests Transfer requests Jul 30, 2018
@mberrueta
Copy link

@jasmingacic , got & reported. will be back soon

@t0mk
Copy link
Contributor

t0mk commented Aug 6, 2018

As @jasmingacic noted, the POST to /projects/<id>/transfers returns 200 OK and empty body.

I noticed there is also no transfer listed for the organization after the creating POST:

=======[REQUEST]=============
POST /projects/7cab5310-b6d8-47c2-9ebe-b9f0810fb525/transfers HTTP/1.1
{"target_organization_id":"f05675c0-c9be-4bac-bb14-73bd6386bdd2"}

=======[RESPONSE]============
HTTP/2.0 200 OK
[empty body]

=======[REQUEST]=============
GET /organizations/f05675c0-c9be-4bac-bb14-73bd6386bdd2/transfers? HTTP/1.1

=======[RESPONSE]============
{"transfers":[]}

packngo.go Outdated
@@ -144,6 +144,7 @@ type Client struct {
SpotMarket SpotMarketService
SpotMarketRequests SpotMarketRequestService
Organizations OrganizationService
TransferRequest TransferRequestsService
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rather TransferRequestService (TranferRequest in singular) to keep it uniform with other Service type names.

@jasmingacic
Copy link
Author

@mberrueta are there any updates on this?

@patrickdevivo
Copy link
Contributor

@mberrueta any update here?

@jacobsmith928
Copy link
Contributor

@mberrueta can you please comment so we can look to close out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants