I know that any compact orientable 3-manifold can be obtained from the three sphere $S^3$ by an integer surgery. I am not sure why the surgery operation is completely determined by Where we map meridians of the tori. More specifically,


an integer surgery is determined by specifying a link in $S^3$ and a framing for each component of that link (or equivalently an integer for each component). For the sake of simplicity in this question I will assume that my link has a single component (a knot).


To perform the surgery we cut out a regular neighborhood of the knot (which is a solid torus) and then we glue back a solid torus by a certain homeomorphism between the surfaces of these two solid tori. What is not clear to me is that why the final manifold is determined by declaring where the homeomophism maps meridian? (in the case of the integer surgery we map the meridian to the framing of the knot). In other words, why the map between these two curves on the tori determine the final 3-manifold (and hence the surgery). 



Integer surgery on $S^3$
You can think about attaching a solid torus as a two-step process:


First, attach $D^2 \times I$ where $D^2$ is the meridional disc of the attaching torus. 


Secondly, attach the remaining of the solid torus, which is homeomorphic to a ball $B^3$. 


Now if we know where the meridian of the solid torus goes, then we know the result of the first step, $M\_1$, up to isotopy. On the other hand, the result of the second step is determined by the map $\phi \colon \partial B^3 \rightarrow \partial M\_1$, up to isotopy. By Smale's theorem, any orientation-preserving diffeomorphism of the 2-sphere is smoothly isotopic to the identity map. Hence the second step is essentially done uniquely. 


