File tree Expand file tree Collapse file tree
testdata/instagram/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 IgBusReply ,
1919 IgBusComment ,
2020 IgBusHashtag ,
21+ IgBusContainer ,
2122)
Original file line number Diff line number Diff line change @@ -132,3 +132,16 @@ class IgBusHashtag(BaseModel):
132132
133133 id : Optional [str ] = field (repr = True , compare = True )
134134 name : Optional [str ] = field (repr = True )
135+
136+
137+ @dataclass
138+ class IgBusContainer (BaseModel ):
139+ """
140+ A class representing the media container.
141+
142+ Refer: https://developers.facebook.com/docs/instagram-api/reference/ig-container
143+ """
144+
145+ id : Optional [str ] = field (repr = True , compare = True )
146+ status : Optional [str ] = field ()
147+ status_code : Optional [str ] = field ()
Original file line number Diff line number Diff line change 1- {
2- "status_code" : " FINISHED" ,
3- "id" : " 17889615691921648"
4- }
1+ {"status_code" :" FINISHED" ,"id" :" 17889615691921648" }
Original file line number Diff line number Diff line change @@ -158,3 +158,11 @@ def test_ig_bus_hashtag(helpers):
158158 hashtag = md .IgBusHashtag .new_from_json_dict (data )
159159 assert hashtag .id == "17841593698074073"
160160 assert hashtag .name == "coke"
161+
162+
163+ def test_ig_bus_container (helpers ):
164+ data = helpers .load_json ("testdata/instagram/models/ig_container.json" )
165+
166+ container = md .IgBusContainer .new_from_json_dict (data )
167+ assert container .id == "17889615691921648"
168+ assert container .status_code == "FINISHED"
You can’t perform that action at this time.
0 commit comments