add unit tests for standalone ig api methods & fix sorting of posts