chg: Add few more calls

pull/241/head
Raphaël Vinot 2018-06-20 16:05:47 +08:00
parent 65ce4c938f
commit 7569972ac9
1 changed files with 40 additions and 1 deletions

View File

@ -146,7 +146,7 @@
"metadata": {},
"outputs": [],
"source": [
"attribute.add_tag('tlp:amber')\n",
"attribute_second.add_tag('tlp:amber')\n",
"\n",
"print(attribute_second.to_json())"
]
@ -291,6 +291,45 @@
"print(bin_obj.references[0].to_json())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Change creator"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pymisp import MISPOrganisation\n",
"orgc = MISPOrganisation()\n",
"orgc.name = 'bazbaz'\n",
"orgc.id = 15\n",
"orgc.uuid = '5888a98d-a7e8-4183-94bb-4d19950d210f'\n",
"# NOTE: Pushing this object will only work if the user has sync right (if not, the orgc key will be ignored)\n",
"event.Orgc = orgc"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Mark event as published"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"event.publish()\n",
"print(event.published)"
]
},
{
"cell_type": "markdown",
"metadata": {},