Skip to content

Instantly share code, notes, and snippets.

@jayd3e
Created July 28, 2012 20:53
Show Gist options
  • Select an option

  • Save jayd3e/3194750 to your computer and use it in GitHub Desktop.

Select an option

Save jayd3e/3194750 to your computer and use it in GitHub Desktop.
How to make a recommended item guide
# The recommended guide for earthshaker
op.bulk_insert(guides,
[
{'id': 1, 'name': 'Earthshaker - Recommended Items'}
])
# Connecting a item_build(group of items) to our guide above. This represents the 'early;
# item section
op.bulk_insert(item_builds,
[
{'id': 2, 'name': 'early', 'guide_id': 1}
])
# Connecting an item with our early item build
op.bulk_insert(build_items,
[
{'build_id': 2, 'item_id': 3}
])
# This is our item that is getting inserted into the db, all of these are already done
# so you don't need to add the item, and id will already exist.
op.bulk_insert(items,
[
{'id': 3, 'name': 'sword of a thousand truths'}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment