Fixed rulings errors for consistency.
This commit is contained in:
		
							parent
							
								
									10000d401f
								
							
						
					
					
						commit
						b00fb026d5
					
				| 
						 | 
				
			
			@ -13,3 +13,6 @@ from scrython.rulings import Mtgo
 | 
			
		|||
from scrython.rulings import Multiverse
 | 
			
		||||
from scrython.rulings import Id
 | 
			
		||||
from scrython.rulings import Code
 | 
			
		||||
 | 
			
		||||
#Import classes from sets
 | 
			
		||||
from scrython.sets import Code
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,48 +40,48 @@ class RulingsObject(object):
 | 
			
		|||
 | 
			
		||||
	def object(self):
 | 
			
		||||
		if self.__checkForKey('object') is None:
 | 
			
		||||
			return KeyError('This object has no key \'object\'')
 | 
			
		||||
			raise KeyError('This object has no key \'object\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['object']
 | 
			
		||||
 | 
			
		||||
	def has_more(self):
 | 
			
		||||
		if self.__checkForKey('has_more') is None:
 | 
			
		||||
			return KeyError('This object has no key \'has_more\'')
 | 
			
		||||
			raise KeyError('This object has no key \'has_more\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['has_more']
 | 
			
		||||
 | 
			
		||||
	def data(self):
 | 
			
		||||
		if self.__checkForKey('data') is None:
 | 
			
		||||
			return KeyError('This object has no key \'data\'')
 | 
			
		||||
			raise KeyError('This object has no key \'data\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['data']
 | 
			
		||||
 | 
			
		||||
	def data_length(self):
 | 
			
		||||
		if self.__checkForKey('data') is None:
 | 
			
		||||
			return KeyError('This object has no key \'data\'')
 | 
			
		||||
			raise KeyError('This object has no key \'data\'')
 | 
			
		||||
 | 
			
		||||
		return len(self.scryfallJson['data'])
 | 
			
		||||
 | 
			
		||||
	def ruling_object(self, num):
 | 
			
		||||
		if self.__checkForTupleKey('data', num, 'object') is None:
 | 
			
		||||
			return KeyError('This ruling has no key \'object\'')
 | 
			
		||||
			raise KeyError('This ruling has no key \'object\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['data'][num]['object']
 | 
			
		||||
 | 
			
		||||
	def ruling_source(self, num):
 | 
			
		||||
		if self.__checkForTupleKey('data', num, 'source') is None:
 | 
			
		||||
			return KeyError('This ruling has no key \'source\'')
 | 
			
		||||
			raise KeyError('This ruling has no key \'source\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['data'][num]['source']
 | 
			
		||||
 | 
			
		||||
	def ruling_published_at(self, num):
 | 
			
		||||
		if self.__checkForTupleKey('data', num, 'published_at') is None:
 | 
			
		||||
			return KeyError('This ruling has no key \'published_at\'')
 | 
			
		||||
			raise KeyError('This ruling has no key \'published_at\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['data'][num]['published_at']
 | 
			
		||||
 | 
			
		||||
	def ruling_comment(self, num):
 | 
			
		||||
		if self.__checkForTupleKey('data', num, 'comment') is None:
 | 
			
		||||
			return KeyError('This ruling has no key \'comment\'')
 | 
			
		||||
			raise KeyError('This ruling has no key \'comment\'')
 | 
			
		||||
 | 
			
		||||
		return self.scryfallJson['data'][num]['comment']
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue