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 {
|
||||
|
|
|
@ -262,34 +262,30 @@ type Support struct {
|
|||
}
|
||||
|
||||
type Claim struct {
|
||||
Address string `json:"address"`
|
||||
Amount string `json:"amount"`
|
||||
ChannelName *string `json:"channel_name,omitempty"`
|
||||
ClaimID string `json:"claim_id"`
|
||||
ClaimSequence int64 `json:"claim_sequence"`
|
||||
DecodedClaim bool `json:"decoded_claim"`
|
||||
Depth int64 `json:"depth"`
|
||||
EffectiveAmount string `json:"effective_amount"`
|
||||
HasSignature *bool `json:"has_signature,omitempty"`
|
||||
Height int `json:"height"`
|
||||
Hex string `json:"hex"`
|
||||
Name string `json:"name"`
|
||||
NormalizedName string `json:"normalized_name"`
|
||||
Nout uint64 `json:"nout"`
|
||||
PermanentUrl string `json:"permanent_url"`
|
||||
SignatureIsValid *bool `json:"signature_is_valid,omitempty"`
|
||||
Supports []Support `json:"supports"`
|
||||
Txid string `json:"txid"`
|
||||
//Type string `json:"type"`
|
||||
ValidAtHeight int `json:"valid_at_height"`
|
||||
Value lbryschema.Claim `json:"value"`
|
||||
Address string `json:"address"`
|
||||
Amount string `json:"amount"`
|
||||
ChannelName *string `json:"channel_name,omitempty"`
|
||||
ClaimID string `json:"claim_id"`
|
||||
ClaimSequence int64 `json:"claim_sequence"`
|
||||
DecodedClaim bool `json:"decoded_claim"`
|
||||
Depth int64 `json:"depth"`
|
||||
EffectiveAmount string `json:"effective_amount"`
|
||||
HasSignature *bool `json:"has_signature,omitempty"`
|
||||
Height int `json:"height"`
|
||||
Hex string `json:"hex"`
|
||||
Name string `json:"name"`
|
||||
NormalizedName string `json:"normalized_name"`
|
||||
Nout uint64 `json:"nout"`
|
||||
PermanentUrl string `json:"permanent_url"`
|
||||
SignatureIsValid *bool `json:"signature_is_valid,omitempty"`
|
||||
Supports []Support `json:"supports"`
|
||||
Txid string `json:"txid"`
|
||||
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