tristanhimmelman / AlamofireObjectMapper

An Alamofire extension which converts JSON response data into swift objects using ObjectMapper
MIT License
2.66k stars 474 forks source link

ResponseArray not available in this version? #203

Closed CedricVanhaverbeke closed 7 years ago

CedricVanhaverbeke commented 7 years ago

Hi!

I should be able to get an array of objects in just 1 line using request.responseArray(). This method does not seem to exist? Any thoughts?

tristanhimmelman commented 7 years ago

Hey @CedricVanhaverbeke,

Not sure why you are experiencing difficulties as this method still exists:

public func responseArray<T: BaseMappable>(queue: DispatchQueue? = nil, keyPath: String? = nil, context: MapContext? = nil, completionHandler: @escaping (DataResponse<[T]>) -> Void) -> Self
CedricVanhaverbeke commented 7 years ago

Can you give an example with this method?

tristanhimmelman commented 7 years ago

Please see the tests included in this project