(data *SemaphoreData)
| 19 | } |
| 20 | |
| 21 | func MakeSemaphore(data *SemaphoreData) *Semaphore { |
| 22 | baseUrl := fmt.Sprintf("https://%s.semaphoreci.com/", data.OrgName) |
| 23 | return &Semaphore{ |
| 24 | data: data, |
| 25 | baseUrl: baseUrl, |
| 26 | client: sling.New().Client(MakeClient()). |
| 27 | Base(baseUrl+"api/"). |
| 28 | // as per API spec |
| 29 | Set("User-Agent", "SemaphoreCI v2.0 Client"). |
| 30 | SetMany(map[string]string{ |
| 31 | "Authorization": "Token " + data.Token, |
| 32 | }), |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | type Semaphore struct { |
| 37 | data *SemaphoreData |
no test coverage detected