reinstate claim type
fix bug adjust types add temporary video_duration until the SDK patches it
This commit is contained in:
parent
3d2986a85c
commit
f827da4c61
3 changed files with 33 additions and 36 deletions
|
@ -238,8 +238,8 @@ type ChannelCreateOptions struct {
|
|||
CoverURL *string `json:"cover_url,omitempty"`
|
||||
}
|
||||
|
||||
func (d *Client) ChannelCreate(name string, bid float64, options ChannelCreateOptions) (*PublishResponse, error) {
|
||||
response := new(PublishResponse)
|
||||
func (d *Client) ChannelCreate(name string, bid float64, options ChannelCreateOptions) (*TransactionSummary, error) {
|
||||
response := new(TransactionSummary)
|
||||
args := struct {
|
||||
Name string `json:"name"`
|
||||
Bid string `json:"bid"`
|
||||
|
@ -261,12 +261,13 @@ type StreamCreateOptions struct {
|
|||
License *string `json:"license,omitempty"`
|
||||
LicenseURL *string `json:"license_url,omitempty"`
|
||||
StreamType *streamType `json:"stream_type,omitempty"`
|
||||
ReleaseTime *int `json:"release_time,omitempty"`
|
||||
Duration *int `json:"duration,omitempty"`
|
||||
ImageWidth *int `json:"image_width,omitempty"`
|
||||
ImageHeight *int `json:"image_height,omitempty"`
|
||||
VideoWidth *int `json:"video_width,omitempty"`
|
||||
VideoHeight *int `json:"video_height,omitempty"`
|
||||
ReleaseTime *int64 `json:"release_time,omitempty"`
|
||||
Duration *uint64 `json:"duration,omitempty"`
|
||||
VideoDuration *uint64 `json:"video_duration,omitempty"` //TODO: this shouldn't exist
|
||||
ImageWidth *uint `json:"image_width,omitempty"`
|
||||
ImageHeight *uint `json:"image_height,omitempty"`
|
||||
VideoWidth *uint `json:"video_width,omitempty"`
|
||||
VideoHeight *uint `json:"video_height,omitempty"`
|
||||
Preview *string `json:"preview,omitempty"`
|
||||
AllowDuplicateName *bool `json:"allow_duplicate_name,omitempty"`
|
||||
ChannelName *string `json:"channel_name,omitempty"`
|
||||
|
|
|
@ -150,8 +150,8 @@ func TestClient_ChannelAbandon(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
txID := channelResponse.Output.Txid
|
||||
nout := channelResponse.Output.Nout
|
||||
txID := channelResponse.Outputs[0].Txid
|
||||
nout := channelResponse.Outputs[0].Nout
|
||||
time.Sleep(10 * time.Second)
|
||||
got, err := d.ChannelAbandon(txID, nout, nil, false)
|
||||
if err != nil {
|
||||
|
|
|
@ -280,16 +280,12 @@ type Claim struct {
|
|||
SignatureIsValid *bool `json:"signature_is_valid,omitempty"`
|
||||
Supports []Support `json:"supports"`
|
||||
Txid string `json:"txid"`
|
||||
//Type string `json:"type"`
|
||||
Type string `json:"type"`
|
||||
ValidAtHeight int `json:"valid_at_height"`
|
||||
Value lbryschema.Claim `json:"value"`
|
||||
}
|
||||
|
||||
type ClaimListResponse []Claim /* {
|
||||
Claims []Claim `json:"claims"`
|
||||
LastTakeoverHeight int `json:"last_takeover_height"`
|
||||
SupportsWithoutClaims []Support `json:"supports_without_claims"`
|
||||
}*/
|
||||
type ClaimListResponse []Claim
|
||||
|
||||
type ClaimListMineResponse struct {
|
||||
Claims []Claim `json:"items"`
|
||||
|
|
Loading…
Reference in a new issue