Skip to content

Commit 5368758

Browse files
committed
Add differential.setdiffproperty to gonduit
1 parent f97ae2a commit 5368758

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

differential.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,13 @@ func (c *Conn) DifferentialGetRawDiff(req requests.DifferentialGetRawDiffRequest
6666

6767
return &res, nil
6868
}
69+
70+
// DifferentialSetDiffProperty performs a call to differential.setdiffproperty
71+
func (c *Conn) DifferentialSetDiffProperty(req requests.DifferentialSetDiffPropertyRequest) error {
72+
var res *responses.Empty
73+
if err := c.Call("differential.setdiffproperty", &res); err != nil {
74+
return err
75+
}
76+
77+
return nil
78+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package requests
2+
3+
import "github.com/thought-machine/gonduit/constants"
4+
5+
// DifferentialSetDiffPropertyRequest represents a request to the differential.setdiffproperty endpoint.
6+
type DifferentialSetDiffPropertyRequest struct {
7+
// ID of the diff (not revision) to set the property on.
8+
DiffID uint64 `json:"diff_id"`
9+
// Name of the property to set
10+
Name string `json:"name"`
11+
// Value of the property. Must be a JSON-encoded string representing an object or array of objects.
12+
Data string `json:"data"`
13+
Request
14+
}

responses/empty.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package responses
2+
3+
// Empty represents an empty response
4+
type Empty struct{}

0 commit comments

Comments
 (0)