Latest stories

search_message

  • Inputs
{
    "author": "string: optional",
    "chat_id": "string: optional",
    "chat_types": "integer between 0 and 3,  chat types: 0 means 'save message' (or 'self chat'), 1 as 'private chat' ( or 'binary chat'), 2 for 'blog chat' and 3 means 'group chat': optional",
    "end_date": "float has dependency to start_date: optional",
    "message_id": "integer: has dependency to page: optional",
    "page": "string: allowed:'next','prev': has dependency to message_id: optional",
    "start_date": "float has dependency to end_date: optional",
    "text": "string: between 1 to 50 characters: optional"
}

  • Errors
{
    "chat_types": [
        {
            "min value is 0": "minimum valid value is  0"
        },
        {
            "max value is 3": "maximum valid value is  3"
        }
    ],
    "enter_at_least_one_search_criterion": "while there is no input",
    "invalid_period_of_time": "end_date and/or start_date is wrong",
    "must_login": "user must be login"
}

  • Extra Description
Search messages based on multiple criteria

  • Sample
  • Url:
https://api.pantel.me/a/search_message?text=test case&start_date=1547892192.3032803535&end_date=1595049457.3163662
  • Output:
                                {
    "search_result": [
        {
            "body": "test case",
            "chat_id": "01061286a6183537978b4691036e84dde144",
            "chat_image_path": "*/*/*/*/*/***************************/i17ae84ba16fb9fd9b29a63d0f8b1ace7.jpg",
            "chat_image_server_id": 4610,
            "chat_name": "Asd Qwe",
            "chat_type": 1,
            "date": 1547644632.8836224,
            "duration": null,
            "is_comment": false,
            "media": null,
            "media_dataurl": null,
            "media_path": null,
            "media_real_name": null,
            "media_server_id": null,
            "media_size": null,
            "media_type": 0,
            "message_id": 1547644632882432,
            "og_data": null,
            "sender_contact_name": null,
            "sender_first_name": "User first name",
            "sender_id": 1000016,
            "sender_image_path": "*/*/*/*/*/***************************/i554b59c43d86425db241915edb82bcb4.jpg",
            "sender_image_server_id": null,
            "sender_last_name": "User last name",
            "size": null,
            "system_chat": false,
            "type": 1,
            "wall_id": null
        }
    ],
    "status": "success",
    "time": 1547892192.3032804
}