TheM4hd1 / SwiftyInsta

Instagram Private API Swift
MIT License
225 stars 51 forks source link

Added new matched `User-Agent`'s, `Highlighted Stories` and some `UserResponse` properties #183

Closed bariscck closed 4 years ago

bariscck commented 4 years ago

New User-Agent's fixed Google Play header and LoginWebView related issues like #173 Added some missing properties to UserResponse like follow counts, profile context vs.. Added Highlighted Stories request

bariscck commented 4 years ago

Added Friendship response for follow, unfollow requests instead of Status response.

bariscck commented 4 years ago

Counters on User is part of handler.users.user request; If send request with primaryKey counter values returns. I'm using it in my app.

I tested new User-Agents in different devices, networks and I've also tested with your repo Swiftagram it works for any request with LoginWebView.

I didn't tested without LoginWebView.

sbertix commented 4 years ago

Replying here so it's easier to follow.

I'm perfectly aware User-like instances when called directly return counters (for instance in /users/:id/info), but they don't in most other cases, e.g. followers, media users, tags, etc. I was just stating that's the reason why they were never included: they are optional fields, definitely not required in the endpoint response schema.\ But I agree with adding them, definitely not a problem 💪

About the user agent, there's no point in even storing it then since it's written in Device but never read, as requests fallback to the default one.\ No point in keeping it in Device, then. I suggest marking it unavailable or removing it entirely.

bariscck commented 4 years ago

Just the better understand; should I remove the parts related to device or User-Agent?

sbertix commented 4 years ago

Just the definition of userAgent from Device: it's never read now, so it serves no purpose. 😊

bariscck commented 4 years ago

Just the definition of userAgent from Device: it's never read now, so it serves no purpose. 😊

😊 Its removed.

sbertix commented 4 years ago

Great 💪 I'll deal with linting (there are some trailing whitespaces, so it might fail in Travis, but no worries), merging this and bumping the pod version, np.

Do you know why the CI report is not showing up here? 😢 @TheM4hd1

TheM4hd1 commented 4 years ago

@sbertix no idea what happened, it shows on travis panel, but not sure why it disabled here.