// Delete deletes board by Board Request.
//
// API doc: No document yet
Delete deletes board by Board Request.

API doc: No document yet
// Delete deletes board by Board Request . // // API doc : No document yet
func (s *BoardsService) Delete(ctx context.Context, id string) error {
	req, err := s.client.NewDeleteRequest(fmt.Sprintf("%s/%s", boardsPath, id))
	if err != nil {
		return err
	}
	resp, err := s.client.Do(ctx, req)
	if err != nil {
		respErr := &RespError{}
		if err := json.NewDecoder(resp.Body).Decode(respErr); err != nil {
			return err
		}
		return respErr
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusNoContent {
		respErr := &RespError{}
		if err := json.NewDecoder(resp.Body).Decode(respErr); err != nil {
			return err
		}
		return fmt.Errorf("status code not expected, got:%d, message:%s", resp.StatusCode, respErr.Message)
	}
	return nil
}
func ( s * BoardsService ) Delete ( ctx context . Context , id string ) error { req , err := s . client . NewDeleteRequest ( fmt . Sprintf ( " " , boardsPath , id ) ) if err != nil { return err } resp , err := s . client . Do ( ctx , req ) if err != nil { respErr := & RespError { } if err := json . NewDecoder ( resp . Body ) . Decode ( respErr ) ; err != nil { return err } return respErr } defer resp . Body . Close ( ) if resp . StatusCode != http . StatusNoContent { respErr := & RespError { } if err := json . NewDecoder ( resp . Body ) . Decode ( respErr ) ; err != nil { return err } return fmt . Errorf ( " " , resp . StatusCode , respErr . Message ) } return nil }
Delete deletes board by Board Request.
Delete deletes board by Board Request .