code: def SaveGallery(self, name=None, items=None):
          
  
          url = 'http://min.us/api/SaveGallery'
  
          if not name:
              if not self.name:
                  name = self.GetItems()[0]
              if self.name:
                  name = self.name
  
          if not items:
              if not self.items:
                  items = self.GetItems()[1]
              elif self.items:
                  items = self.items
  
          params = {"name": name, "id":self.editor_id, "items":items}
  
          try:
              response = _dopost(url, params)
          except:
              pass
          else:
              self.name = name
              self.items = items
docs: Use this to update the gallery name or change sort order.
          Specify which attribute (name or items or both) you want to change.