Extracts an ISO
(p *ExtractIsoParams)
| 1121 | |
| 1122 | // Extracts an ISO |
| 1123 | func (s *ISOService) ExtractIso(p *ExtractIsoParams) (*ExtractIsoResponse, error) { |
| 1124 | resp, err := s.cs.newPostRequest("extractIso", p.toURLValues()) |
| 1125 | if err != nil { |
| 1126 | return nil, err |
| 1127 | } |
| 1128 | |
| 1129 | var r ExtractIsoResponse |
| 1130 | if err := json.Unmarshal(resp, &r); err != nil { |
| 1131 | return nil, err |
| 1132 | } |
| 1133 | |
| 1134 | // If we have a async client, we need to wait for the async result |
| 1135 | if s.cs.async { |
| 1136 | b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout) |
| 1137 | if err != nil { |
| 1138 | if err == AsyncTimeoutErr { |
| 1139 | return &r, err |
| 1140 | } |
| 1141 | return nil, err |
| 1142 | } |
| 1143 | |
| 1144 | b, err = getRawValue(b) |
| 1145 | if err != nil { |
| 1146 | return nil, err |
| 1147 | } |
| 1148 | |
| 1149 | if err := json.Unmarshal(b, &r); err != nil { |
| 1150 | return nil, err |
| 1151 | } |
| 1152 | } |
| 1153 | |
| 1154 | return &r, nil |
| 1155 | } |
| 1156 | |
| 1157 | type ExtractIsoResponse struct { |
| 1158 | Accountid string `json:"accountid"` |
nothing calls this directly
no test coverage detected