Add internal-apis client #59

Merged
anbsky merged 2 commits from feature/lbryinc3 into master 2019-05-10 15:16:05 +02:00
anbsky commented 2019-05-10 14:48:25 +02:00 (Migrated from github.com)
No description provided.
nikooo777 (Migrated from github.com) approved these changes 2019-05-10 15:04:26 +02:00
nikooo777 (Migrated from github.com) left a comment

Cool new feature!

One suggestion I'd have is to avoid named return parameters, I know Grin doesn't like them very much. aka func ...(...)(err error) instead of func ...(...) error

Cool new feature! One suggestion I'd have is to avoid named return parameters, I know Grin doesn't like them very much. aka `func ...(...)(err error)` instead of `func ...(...) error`
nikooo777 (Migrated from github.com) commented 2019-05-10 14:55:42 +02:00

I believe that across lbry.go and internal-apis we alias this to log

I believe that across lbry.go and internal-apis we alias this to `log`
nikooo777 (Migrated from github.com) commented 2019-05-10 14:58:49 +02:00

I'd name this defaultAPIEndpoint or defaultAPIHost as Server Address is a bit too generic

I'd name this `defaultAPIEndpoint` or `defaultAPIHost` as Server Address is a bit too generic
nikooo777 (Migrated from github.com) commented 2019-05-10 14:59:06 +02:00

this can go

this can go
nikooo777 (Migrated from github.com) commented 2019-05-10 15:00:45 +02:00

you can shorten this to
return ioutil.ReadAll(r.Body)

you can shorten this to `return ioutil.ReadAll(r.Body)`
@ -0,0 +21,4 @@
}
// APIResponse reflects internal-apis JSON response format.
type APIResponse struct {
nikooo777 (Migrated from github.com) commented 2019-05-10 14:57:51 +02:00
perhaps you can reuse this https://github.com/lbryio/lbry.go/blob/master/extras/api/server.go#L35
anbsky (Migrated from github.com) reviewed 2019-05-10 15:05:32 +02:00
@ -0,0 +21,4 @@
}
// APIResponse reflects internal-apis JSON response format.
type APIResponse struct {
anbsky (Migrated from github.com) commented 2019-05-10 15:05:32 +02:00

the fields do not match unfortunately

the fields do not match unfortunately
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry.go#59
No description provided.