Exemplo n.º 1
0
Arquivo: _Place.py Projeto: granpk/SOL
 def __init__(self, id="",dictionary=dict()):
     dictionary= _Utils.CastToDictionary(dictionary)
     dictionary= _Utils.removeEmptyFields(dictionary)
     self.attributes=""
     self.bounding_box=""
     self.country=""
     self.country_code=""
     self.full_name=""
     self.id=id
     self.name=""
     self.place_type=""
     self.url=""
     if ("attributes" in dictionary):
         self.attributes= _Place_Attributes.Place_Attributes(dictionary=dictionary["attributes"])
     if ("bounding_box" in dictionary):
         self.bounding_box= _Bouding_Box.Bounding_box(dictionary=dictionary["bounding_box"])
     if ("country" in dictionary):
         self.country=dictionary["country"]
     if ("country_code" in dictionary):
         self.country_code=dictionary["country_code"]
     if ("full_name" in dictionary):
         self.full_name=dictionary["full_name"]
     if ("id" in dictionary):
         self.id=dictionary["id"]
     if ("name" in dictionary):
         self.name=dictionary["name"]
     if ("place_type" in dictionary):
         self.place_type=dictionary["place_type"]
     if ("url" in dictionary):
         self.url=dictionary["url"]
Exemplo n.º 2
0
 def __init__(self, dictionary=dict()):
     dictionary= _Utils.CastToDictionary(dictionary)
     dictionary= _Utils.removeEmptyFields(dictionary)
     self.street_address=""
     self.locality=""
     self.region=""
     self.iso3=""
     self.postal_code=""
     self.phone=""
     self.twitter=""
     self.url=""
     self.app_id=""
     if ("street_address" in dictionary):
         self.street_address=dictionary["street_address"]
     if ("locality" in dictionary):
         self.locality=dictionary["locality"]
     if ("region" in dictionary):
         self.region=dictionary["region"]
     if ("iso3" in dictionary):
         self.iso3=dictionary["iso3"]
     if ("postal_code" in dictionary):
         self.postal_code=dictionary["postal_code"]
     if ("phone" in dictionary):
         self.phone=dictionary["phone"]
     if ("twitter" in dictionary):
         self.twitter=dictionary["twitter"]
     if ("url" in dictionary):
         self.url=dictionary["url"]
     if ("app:id" in dictionary):
         self.app_id=dictionary["app:id"]
Exemplo n.º 3
0
 def __init__(self, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.coordinates = ""
     self.type = ""
     if ("coordinates" in dictionary):
         self.coordinates = dictionary["coordinates"]
     if ("type" in dictionary):
         self.type = dictionary["type"]
Exemplo n.º 4
0
 def __init__(self, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.indices = ""
     self.text = ""
     if ("indices" in dictionary):
         self.indices = dictionary["indices"]
     if ("text" in dictionary):
         self.text = dictionary["text"]
Exemplo n.º 5
0
 def __init__(self, id="", dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.id = id
     self.id_str = ""
     self.screen_name = ""
     if ("id" in dictionary):
         self.id = dictionary["id"]
     if ("id_str" in dictionary):
         self.id_str = dictionary["id_str"]
     if ("screen_name" in dictionary):
         self.screen_name = dictionary["screen_name"]
Exemplo n.º 6
0
 def __init__(self, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.h = ""
     self.resize = ""
     self.w = ""
     if ("h" in dictionary):
         self.h = dictionary["h"]
     if ("resize" in dictionary):
         self.resize = dictionary["resize"]
     if ("w" in dictionary):
         self.w = dictionary["w"]
Exemplo n.º 7
0
 def __init__(self, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.display_url = ""
     self.expanded_url = ""
     self.indices = ""
     self.url = ""
     if ("display_url" in dictionary):
         self.display_url = dictionary["display_url"]
     if ("expanded_url" in dictionary):
         self.expanded_url = dictionary["expanded_url"]
     if ("indices" in dictionary):
         self.indices = dictionary["indices"]
     if ("url" in dictionary):
         self.url = dictionary["url"]
Exemplo n.º 8
0
 def __init__(self, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.thumb = ""
     self.large = ""
     self.medium = ""
     self.small = ""
     if ("thumb" in dictionary):
         self.thumb = _Size.Size(dictionary=dictionary["thumb"])
     if ("large" in dictionary):
         self.large = _Size.Size(dictionary=dictionary["large"])
     if ("medium" in dictionary):
         self.medium = _Size.Size(dictionary=dictionary["medium"])
     if ("small" in dictionary):
         self.small = _Size.Size(dictionary=dictionary["small"])
Exemplo n.º 9
0
 def __init__(self, id=None, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.recipient_screen_name = ""
     self._api = ""
     self.id = id
     self.recipient = ""
     self.recipient_id = ""
     self.entities = ""
     self.recipient_id_str = ""
     self.sender_screen_name = ""
     self.id_str = ""
     self.sender_id = ""
     self.text = ""
     self.created_at = ""
     self.sender = ""
     self.sender_id_str = ""
     if ("recipient_screen_name" in dictionary):
         self.recipient_screen_name = dictionary["recipient_screen_name"]
     if ("id" in dictionary):
         self.id = dictionary["id"]
     if ("recipient" in dictionary):
         self.recipient = _TwitterUser.TwitterUser(
             dictionary=dictionary["recipient"])
     if ("recipient_id" in dictionary):
         self.recipient_id = dictionary["recipient_id"]
     if ("entities" in dictionary):
         self.entities = _Entity.Entity(dictionary=dictionary["entities"])
     if ("recipient_id_str" in dictionary):
         self.recipient_id_str = dictionary["recipient_id_str"]
     if ("sender_screen_name" in dictionary):
         self.sender_screen_name = dictionary["sender_screen_name"]
     if ("id_str" in dictionary):
         self.id_str = dictionary["id_str"]
     if ("sender_id" in dictionary):
         self.sender_id = dictionary["sender_id"]
     if ("text" in dictionary):
         self.text = dictionary["text"]
     if ("created_at" in dictionary):
         self.created_at = dictionary["created_at"]
     if ("sender" in dictionary):
         self.sender = _TwitterUser.TwitterUser(
             dictionary=dictionary["sender"])
     if ("sender_id_str" in dictionary):
         self.sender_id_str = dictionary["sender_id_str"]
Exemplo n.º 10
0
 def __init__(self, dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.hashtags = list()
     self.media = list()
     self.urls = list()
     self.user_mentions = list()
     if ("hashtags" in dictionary):
         for hash in dictionary["hashtags"]:
             self.hashtags.append(_Hashtags.Hashtags(dictionary=hash))
     if ("media" in dictionary):
         for m in dictionary["media"]:
             self.media.append(_Media.Media(dictionary=m))
     if ("urls" in dictionary):
         for url in dictionary["urls"]:
             self.urls.append(_URL.URL(dictionary=url))
     if ("user_mentions" in dictionary):
         for mention in dictionary["user_mentions"]:
             self.user_mentions.append(
                 _User_Mention.User_Mention(dictionary=mention))
Exemplo n.º 11
0
Arquivo: _Media.py Projeto: granpk/SOL
 def __init__(self, id="", dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.display_url = ""
     self.expanded_url = ""
     self.id = id
     self.id_str = ""
     self.indices = ""
     self.media_url = ""
     self.media_url_https = ""
     self.sizes = ""
     self.source_status_id = ""
     self.source_status_id_str = ""
     self.type = ""
     self.url = ""
     if ("display_url" in dictionary):
         self.display_url = dictionary["display_url"]
     if ("expanded_url" in dictionary):
         self.expanded_url = dictionary["expanded_url"]
     if ("id" in dictionary):
         self.id = dictionary["id"]
     if ("id_str" in dictionary):
         self.id_str = dictionary["id_str"]
     if ("indices" in dictionary):
         self.indices = dictionary["indices"]
     if ("media_url" in dictionary):
         self.media_url = dictionary["media_url"]
     if ("media_url_https" in dictionary):
         self.media_url_https = dictionary["media_url_https"]
     if ("sizes" in dictionary):
         self.sizes = _Sizes.Sizes(dictionary=dictionary["sizes"])
     if ("source_status_id" in dictionary):
         self.source_status_id = dictionary["source_status_id"]
     if ("source_status_id_str" in dictionary):
         self.source_status_id_str = dictionary["source_status_id_str"]
     if ("type" in dictionary):
         self.type = dictionary["type"]
     if ("url" in dictionary):
         self.url = dictionary["url"]
Exemplo n.º 12
0
 def __init__(self, id="", dictionary=dict()):
     dictionary = _Utils.CastToDictionary(dictionary)
     dictionary = _Utils.removeEmptyFields(dictionary)
     self.contributors_enabled = ""
     self.created_at = ""
     self.default_profile = ""
     self.default_profile_image = ""
     self.description = ""
     self.entities = ""
     self.favourites_count = ""
     self.follow_request_sent = ""
     self.following = ""
     self.followers_count = ""
     self.friends_count = ""
     self.geo_enabled = ""
     self.id = id
     self.id_str = ""
     self.is_translator = ""
     self.lang = ""
     self.listed_count = ""
     self.location = ""
     self.name = ""
     self.notifications = ""
     self.profile_background_color = ""
     self.profile_background_image_url = ""
     self.profile_background_image_url_https = ""
     self.profile_background_tile = ""
     self.profile_banner_url = ""
     self.profile_image_url = ""
     self.profile_image_url_https = ""
     self.profile_link_color = ""
     self.profile_sidebar_border_color = ""
     self.profile_sidebar_fill_color = ""
     self.profile_text_color = ""
     self.profile_use_background_image = ""
     self.protected = ""
     self.screen_name = ""
     self.show_all_inline_media = ""
     self.status = ""
     self.statuses_count = ""
     self.time_zone = ""
     self.url = ""
     self.utc_offset = ""
     self.verified = ""
     self.withheld_in_countries = ""
     self.withheld_scope = ""
     if ("contributors_enabled" in dictionary):
         self.contributors_enabled = dictionary["contributors_enabled"]
     if ("created_at" in dictionary):
         self.created_at = dictionary["created_at"]
     if ("default_profile" in dictionary):
         self.default_profile = dictionary["default_profile"]
     if ("default_profile_image" in dictionary):
         self.default_profile_image = dictionary["default_profile_image"]
     if ("description" in dictionary):
         self.description = dictionary["description"]
     if ("entities" in dictionary):
         self.entities = _Entity.Entity(dictionary=dictionary["entities"])
     if ("favourites_count" in dictionary):
         self.favourites_count = dictionary["favourites_count"]
     if ("follow_request_sent" in dictionary):
         self.follow_request_sent = dictionary["follow_request_sent"]
     if ("following" in dictionary):
         self.following = dictionary["following"]
     if ("followers_count" in dictionary):
         self.followers_count = dictionary["followers_count"]
     if ("friends_count" in dictionary):
         self.friends_count = dictionary["friends_count"]
     if ("geo_enabled" in dictionary):
         self.geo_enabled = dictionary["geo_enabled"]
     if ("id" in dictionary):
         self.id = dictionary["id"]
     if ("id_str" in dictionary):
         self.id_str = dictionary["id_str"]
     if ("is_translator" in dictionary):
         self.is_translator = dictionary["is_translator"]
     if ("lang" in dictionary):
         self.lang = dictionary["lang"]
     if ("listed_count" in dictionary):
         self.listed_count = dictionary["listed_count"]
     if ("location" in dictionary):
         self.location = dictionary["location"]
     if ("name" in dictionary):
         self.name = dictionary["name"]
     if ("notifications" in dictionary):
         self.notifications = dictionary["notifications"]
     if ("profile_background_color" in dictionary):
         self.profile_background_color = dictionary[
             "profile_background_color"]
     if ("profile_background_image_url" in dictionary):
         self.profile_background_image_url = dictionary[
             "profile_background_image_url"]
     if ("profile_background_image_url_https" in dictionary):
         self.profile_background_image_url_https = dictionary[
             "profile_background_image_url_https"]
     if ("profile_background_tile" in dictionary):
         self.profile_background_tile = dictionary[
             "profile_background_tile"]
     if ("profile_banner_url" in dictionary):
         self.profile_banner_url = dictionary["profile_banner_url"]
     if ("profile_image_url" in dictionary):
         self.profile_image_url = dictionary["profile_image_url"]
     if ("profile_image_url_https" in dictionary):
         self.profile_image_url_https = dictionary[
             "profile_image_url_https"]
     if ("profile_link_color" in dictionary):
         self.profile_link_color = dictionary["profile_link_color"]
     if ("profile_sidebar_border_color" in dictionary):
         self.profile_sidebar_border_color = dictionary[
             "profile_sidebar_border_color"]
     if ("profile_sidebar_fill_color" in dictionary):
         self.profile_sidebar_fill_color = dictionary[
             "profile_sidebar_fill_color"]
     if ("profile_text_color" in dictionary):
         self.profile_text_color = dictionary["profile_text_color"]
     if ("profile_use_background_image" in dictionary):
         self.profile_use_background_image = dictionary[
             "profile_use_background_image"]
     if ("protected" in dictionary):
         self.protected = dictionary["protected"]
     if ("screen_name" in dictionary):
         self.screen_name = dictionary["screen_name"]
     if ("show_all_inline_media" in dictionary):
         self.show_all_inline_media = dictionary["show_all_inline_media"]
     if ("status" in dictionary):
         self.status = _Tweet.Tweet(dictionary=dictionary["status"])
     if ("statuses_count" in dictionary):
         self.statuses_count = dictionary["statuses_count"]
     if ("time_zone" in dictionary):
         self.time_zone = dictionary["time_zone"]
     if ("url" in dictionary):
         self.url = dictionary["url"]
     if ("utc_offset" in dictionary):
         self.utc_offset = dictionary["utc_offset"]
     if ("verified" in dictionary):
         self.verified = dictionary["verified"]
     if ("withheld_in_countries" in dictionary):
         self.withheld_in_countries = dictionary["withheld_in_countries"]
     if ("withheld_scope" in dictionary):
         self.withheld_scope = dictionary["withheld_scope"]
Exemplo n.º 13
0
Arquivo: _Tweet.py Projeto: granpk/SOL
    def __init__(self, id="", dictionary=dict()):

        dictionary = _Utils.CastToDictionary(dictionary)
        dictionary = _Utils.removeEmptyFields(dictionary)
        self.annotations = ""
        self.contributors = list()
        self.coordinates = ""
        self.created_at = ""
        self.current_user_retweet = ""
        self.entities = ""
        self.favorite_count = ""
        self.favorited = ""
        self.filter_level = ""
        self.id = id
        self.id_str = ""
        self.in_reply_to_screen_name = ""
        self.lang = ""
        self.place = ""
        self.possibly_sensitive = ""
        self.quoted_status_id = ""
        self.quoted_status_id_str = ""
        self.quoted_status = ""
        self.scopes = ""
        self.retweet_count = ""
        self.retweeted = ""
        self.retweeted_status = ""
        self.source = ""
        self.text = ""
        self.truncated = ""
        self.user = ""
        self.withheld_copyright = ""
        self.withheld_in_countries = ""
        self.withheld_scope = ""
        if ("annotations" in dictionary):
            self.annotations = dictionary["annotations"]
        if ("contributors" in dictionary):
            for cont in dictionary["contributors"]:
                self.contributors.append(
                    _Contributor.Contributor(dictionary=cont))
        if ("coordinates" in dictionary):
            self.coordinates = _Coordinates.Coordinates(
                dictionary=dictionary["coordinates"])
        if ("created_at" in dictionary):
            self.created_at = dictionary["created_at"]
        if ("current_user_retweet" in dictionary):
            self.current_user_retweet = dictionary["current_user_retweet"]
        if ("entities" in dictionary):
            self.entities = _Entity.Entity(dictionary=dictionary["entities"])
        if ("favorite_count" in dictionary):
            self.favorite_count = dictionary["favorite_count"]
        if ("favorited" in dictionary):
            self.favorited = dictionary["favorited"]
        if ("filter_level" in dictionary):
            self.filter_level = dictionary["filter_level"]
        if ("id" in dictionary):
            self.id = dictionary["id"]
        if ("id_str" in dictionary):
            self.id_str = dictionary["id_str"]
        if ("in_reply_to_screen_name" in dictionary):
            self.in_reply_to_screen_name = dictionary[
                "in_reply_to_screen_name"]
        if ("lang" in dictionary):
            self.lang = dictionary["lang"]
        if ("place" in dictionary):
            self.place = _Place.Place(dictionary=dictionary["place"])
        if ("possibly_sensitive" in dictionary):
            self.possibly_sensitive = dictionary["possibly_sensitive"]
        if ("quoted_status_id" in dictionary):
            self.quoted_status_id = dictionary["quoted_status_id"]
        if ("quoted_status_id_str" in dictionary):
            self.quoted_status_id_str = dictionary["quoted_status_id_str"]
        if ("quoted_status" in dictionary):
            self.quoted_status = Tweet(dictionary=dictionary["quoted_status"])
        if ("scopes" in dictionary):
            self.scopes = dictionary["scopes"]
        if ("retweet_count" in dictionary):
            self.retweet_count = dictionary["retweet_count"]
        if ("retweeted" in dictionary):
            self.retweeted = dictionary["retweeted"]
        if ("retweeted_status" in dictionary):
            self.retweeted_status = Tweet(
                dictionary=dictionary["retweeted_status"])
        if ("source" in dictionary):
            self.source = dictionary["source"]
        if ("text" in dictionary):
            self.text = dictionary["text"]
        if ("truncated" in dictionary):
            self.truncated = dictionary["truncated"]
        if ("user" in dictionary):
            self.user = _TwitterUser.TwitterUser(dictionary=dictionary["user"])
        if ("withheld_copyright" in dictionary):
            self.withheld_copyright = dictionary["withheld_copyright"]
        if ("withheld_in_countries" in dictionary):
            self.withheld_in_countries = dictionary["withheld_in_countries"]
        if ("withheld_scope" in dictionary):
            self.withheld_scope = dictionary["withheld_scope"]