Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unimplemented methods #22

Open
nborrmann opened this issue May 9, 2017 · 3 comments
Open

Unimplemented methods #22

nborrmann opened this issue May 9, 2017 · 3 comments

Comments

@nborrmann
Copy link
Owner

nborrmann commented May 9, 2017

The following methods are availabe through the Jodel API but not implemented for various reasons. Leave a comment if you want some of them in jodel_api (they're untested but should be mostly production ready, so you can just copy them in if you want).

Moderation:

def get_moderation_feed(self, **kwargs):
    return self._send_request("GET", "/v3/moderation", **kwargs)

def get_moderation_notification_status(self, **kwargs):
    return self._send_request("GET", "/v3/moderation/notificationStatus", **kwargs)

def get_moderation_task_info(self, **kwargs):
    return self._send_request("GET", "/v3/moderation/taskInfo", **kwargs)

def send_moderation_result(self, decision, task_id, **kwargs):
    return self._send_request("POST", "/v3/moderation", payload={"decision": decision, "task_id": task_id}, **kwargs)

I'd like to implement them, but I don't have a moderation-enabled account, so I can't test them. If you'd be willing to hand me a mod account, please contact me.

These seem rather unneccessary:

def hide_post(self, post_id, **kwargs):
    return self._send_request("PUT", "/v3/posts/{}/hide".format(post_id), **kwargs)

def flag_post(self, post_id, reason_id, subreason_id, **kwargs):
    return self._send_request("PUT", "/v2/posts/{}/flag".format(post_id), payload={"reason_id": reason_id, "subreason_id": subreason_id}, **kwargs)

def send_home_town(self, location, **kwargs):
    return self._send_request("PUT", "/v3/user/home", payload={"location": self._get_location_dict(self.lat, self.lng, self.city)}, **kwargs)

def delet_user_home(self, **kwargs):
    return self._send_request("DELETE", "/v3/user/home", **kwargs)

I don't even know what they're for:

def send_language(self, language, **kwargs):
    return self._send_request("PUT", "/v3/user/language", payload={"language": language}, **kwargs)

def send_logs(self, **kwargs):
    return self._send_request("PUT", "/v3/investigate", **kwargs)

def track_action(self, action, **kwargs):
    return self._send_request("POST", "/v3/action", payload={"action": action}, **kwargs)

These methods are probably an alternative verification method to the captcha. Might be useful in the future if they disable the captcha verification.

def send_push_token(self, client_id, push_token, **kwargs):
    return self._send_request("PUT", "/v2/users/pushToken", payload={"client_id": client_id, "push_token": push_token}, **kwargs)

def verify_push(self, server_time, verification_code, **kwargs):
    return self._send_request("POST", "/v3/user/verification/push", payload={"server_time": server_time, "verification_code": verification_code}, **kwargs)

def post_user_verification_iid(self, iid, **kwargs):
    return self._send_request("POST", "/v3/user/verification/iid", payload={"iid": iid}, **kwargs)
nborrmann added a commit that referenced this issue May 9, 2017
@nborrmann
Copy link
Owner Author

nborrmann commented May 11, 2017

Here's two new endpoints from version 4.44.1:

def feed_internationalization_disable(self, **kwargs):
    return self._send_request("PUT", "/v3/user/feedInternationalization/disable", **kwargs)

def feed_internationalization_enable(self, **kwargs):
    return self._send_request("PUT", "/v3/user/feedInternationalization/enable", **kwargs)

Apparently there will be two feeds, an international and a national one.

@nborrmann
Copy link
Owner Author

nborrmann commented Jun 15, 2017

New stuff in version 4.48:

Captcha verification has been removed. Now it is only possible to verify an account using google cloud messaging. This should be reversible as well, but I didn't have the time to deal with that yet.

The following endpoints have changed in connection with that:

def post_user_verification_instance_id(self, iid, **kwargs):
      return self._send_request("POST", "/v3/user/verification/iid", payload={"iid": iid}, **kwargs)

def signup_to_get_access_token(self, client_id, device_uid, iid, location, **kwargs):
    return self._send_request("POST", "/v2/users/", payload={"client_id": client_id, "device_uid": device_uid, "iid": iid, "location": location}, **kwargs)

Full-text search is possible now:

def post_posts_search(self, message, skip, limit, home, **kwargs):
    return self._send_request("POST", "/v3/posts/search", params={"skip": skip, "limit": limit, "home": home}, payload={"message": message}, **kwargs)

@nborrmann
Copy link
Owner Author

These don't work yet:

def get_filter_place_combo(self, place_id, **kwargs):
    return self._send_request("GET", "/v3/posts/filter/places/{}/combo".format(place_id), **kwargs)

def get_filter_place_discussed(self, place_id, after, limit, **kwargs):
    return self._send_request("GET", "/v3/posts/filter/places/{}/discussed".format(place_id), params={"after": after, "limit": limit}, **kwargs)

def get_filter_place_popular(self, place_id, after, limit, **kwargs):
    return self._send_request("GET", "/v3/posts/filter/places/{}/popular".format(place_id), params={"after": after, "limit": limit}, **kwargs)

def get_filter_place_recent(self, place_id, after, limit, **kwargs):
    return self._send_request("GET", "/v3/posts/filter/places/{}/recent".format(place_id), params={"after": after, "limit": limit}, **kwargs)

def get_place_search(self, **kwargs):
    return self._send_request("GET", "/v3/places/search", **kwargs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant