/[marcuscom]/meraki/meraki_api/__init__.py
ViewVC logotype

Diff of /meraki/meraki_api/__init__.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20639 by jclarke, Sat May 19 09:03:06 2018 UTC revision 20640 by jclarke, Sun Jul 28 18:14:26 2019 UTC
# Line 24  Line 24 
24    
25  import requests  import requests
26  import logging  import logging
27    import json
28    
29    
30  class Meraki(object):  class Meraki(object):
# Line 133  class Meraki(object): Line 134  class Meraki(object):
134    
135          jobj = response.json()          jobj = response.json()
136          self.__populate_obj(jobj)          self.__populate_obj(jobj)
137          self._name = jobj[self._name_prop]          # Object may not have a name yet.
138            if self._name_prop in jobj:
139                self._name = jobj[self._name_prop]
140                
141          self._initialized = True          self._initialized = True
142          return True          return True
143    
# Line 257  class Organization(Meraki): Line 261  class Organization(Meraki):
261                      payload[key] = kwargs[key]                      payload[key] = kwargs[key]
262    
263          if 'type' not in kwargs:          if 'type' not in kwargs:
264              payload['type'] = 'wireless switch appliance phone'              payload['type'] = 'wireless switch appliance'
265    
266          url = self.ORG_API + '/' + self._id + '/networks'          url = self.ORG_API + '/' + self._id + '/networks'
267          try:          try:

Legend:
Removed from v.20639  
changed lines
  Added in v.20640

  ViewVC Help
Powered by ViewVC 1.1.27