code: public Response join(String groupId, boolean acceptRules) throws JinxException {
      JinxUtils.validateParams(groupId);
      Map<String, String> params = new TreeMap<>();
      params.put("method", "flickr.groups.join");
      params.put("group_id", groupId);
      if (acceptRules) {
        params.put("accept_rules", "true");
      }
      return jinx.flickrPost(params, Response.class);
    }
docs: Join a public group as a member.
  <br>
  This method requires authentication with 'write' permission.
  <br>
  
  @param groupId     (Required) The NSID of the group to join.
  @param acceptRules If the group has rules, they must be displayed to the user prior to joining.
  Passing a true value for this argument specifies that the application has displayed the group
  rules to the user, and that the user has agreed to them.
  @return object with response from Flickr indicating ok or fail.
  @throws JinxException if required parameters are missing, or if there are any errors.
  @see <a href="https://www.flickr.com/services/api/flickr.groups.join.html">flickr.groups.join</a>