Rename /api/v1/get_updates to /api/v1/get_messages.
(imported from commit f856637158cf9fda64ba333b532a5941de8fcbab)
This commit is contained in:
		
							parent
							
								
									aaa62c0837
								
							
						
					
					
						commit
						9c500c5b0d
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -26,7 +26,7 @@ class HumbugAPI():
 | 
				
			||||||
        options["email"] = self.email
 | 
					        options["email"] = self.email
 | 
				
			||||||
        options["api-key"] = self.api_key
 | 
					        options["api-key"] = self.api_key
 | 
				
			||||||
        submit_data = urllib.urlencode([(k, v.encode('utf-8')) for k,v in options.items()])
 | 
					        submit_data = urllib.urlencode([(k, v.encode('utf-8')) for k,v in options.items()])
 | 
				
			||||||
        res = self.browser.open(self.base_url + "/api/v1/get_updates", submit_data)
 | 
					        res = self.browser.open(self.base_url + "/api/v1/get_messages", submit_data)
 | 
				
			||||||
        return simplejson.loads(res.read())['zephyrs']
 | 
					        return simplejson.loads(res.read())['zephyrs']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def call_on_each_message(self, callback, options = {}):
 | 
					    def call_on_each_message(self, callback, options = {}):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										7
									
								
								examples/curl-examples
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										7
									
								
								examples/curl-examples
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
					@ -1,4 +1,7 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
# Two quick API tests using curl
 | 
					# Two quick API tests using curl
 | 
				
			||||||
curl 127.0.0.1:8000/api/send_message -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com" -d "type=personal" -d "new_zephyr=test" -d "recipient=tabbott@humbughq.com"
 | 
					curl -k --digest -u tabbott:xxxxxxxxxxxxxxxxx https://app.humbughq.com/api/v1/send_message -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com" -d "type=personal" -d "new_zephyr=test" -d "recipient=tabbott@humbughq.com"
 | 
				
			||||||
curl 127.0.0.1:8000/api/get_updates_new -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com
 | 
					curl -k --digest -u "tabbott:xxxxxxxxxxxxxxxxx" https://app.humbughq.com/api/v1/get_messages -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Replace '-k --digest -u tabbott:xxxxxxxxxxxxxxxxx https://app.humbughq.com'
 | 
				
			||||||
 | 
					# with "http://127.0.0.1:8000" for local testing
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue