Refactors API call to get articles