summaryrefslogtreecommitdiff
path: root/include/tgbot/types/InlineQueryResultLocation.h
blob: cf2f1e0ea604378583015495bc7b109b8e95f2fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef TGBOT_INLINEQUERYRESULTLOCATION_H
#define TGBOT_INLINEQUERYRESULTLOCATION_H

#include "tgbot/types/InlineQueryResult.h"
#include "tgbot/types/InputMessageContent.h"

#include <cstdint>
#include <memory>
#include <string>

namespace TgBot {

/**
 * @brief Represents a location on a map.
 *
 * By default, the location will be sent by the user.
 * Alternatively, you can use inputMessageContent to send a message with the specified content instead of the location.
 *
 * @ingroup types
 */
class InlineQueryResultLocation : public InlineQueryResult {

public:
    static const std::string TYPE;

    typedef std::shared_ptr<InlineQueryResultLocation> Ptr;

    InlineQueryResultLocation() {
        this->type = TYPE;
    }

    /**
     * @brief Location latitude in degrees
     */
    float latitude;

    /**
     * @brief Location longitude in degrees
     */
    float longitude;

    /**
     * @brief Location title
     */
    std::string title;

    /**
     * @brief Optional. The radius of uncertainty for the location, measured in meters; 0-1500
     */
    float horizontalAccuracy;

    /**
     * @brief Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
     */
    std::int32_t livePeriod;

    /**
     * @brief Optional. For live locations, a direction in which the user is moving, in degrees.
     *
     * Must be between 1 and 360 if specified.
     */
    std::int32_t heading;

    /**
     * @brief Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters.
     *
     * Must be between 1 and 100000 if specified.
     */
    std::int32_t proximityAlertRadius;

    /**
     * @brief Optional. Content of the message to be sent instead of the location
     */
    InputMessageContent::Ptr inputMessageContent;

    /**
     * @brief Optional. Url of the thumbnail for the result
     */
    std::string thumbnailUrl;

    /**
     * @brief Optional. Thumbnail width
     */
    std::int32_t thumbnailWidth;

    /**
     * @brief Optional. Thumbnail height
     */
    std::int32_t thumbnailHeight;
};
}

#endif //TGBOT_INLINEQUERYRESULTLOCATION_H